Skip to main content

aws_s3_transfer/model/
error.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// The given enum value failed to parse since it is not a known value.
3#[derive(Debug)]
4pub struct UnknownVariantError {
5    value: ::std::string::String,
6}
7impl UnknownVariantError {
8    pub(crate) fn new(value: impl ::std::convert::Into<::std::string::String>) -> Self {
9        Self {
10            value: value.into(),
11        }
12    }
13}
14impl ::std::fmt::Display for UnknownVariantError {
15    fn fmt(
16        &self,
17        f: &mut ::std::fmt::Formatter<'_>,
18    ) -> ::std::result::Result<(), ::std::fmt::Error> {
19        write!(f, "unknown enum variant: '{}'", self.value)
20    }
21}
22impl ::std::error::Error for UnknownVariantError {}