fn from_str()

in rust-runtime/aws-smithy-types/src/retry.rs [114:125]


    fn from_str(string: &str) -> Result<Self, Self::Err> {
        let string = string.trim();
        // eq_ignore_ascii_case is OK here because the only strings we need to check for are ASCII
        if string.eq_ignore_ascii_case("standard") {
            Ok(RetryMode::Standard)
        // TODO(https://github.com/awslabs/aws-sdk-rust/issues/247): adaptive retries
        // } else if string.eq_ignore_ascii_case("adaptive") {
        //     Ok(RetryMode::Adaptive)
        } else {
            Err(RetryModeParseErr(string.to_owned()))
        }
    }