#[non_exhaustive]pub enum ChecksumAlgorithm {
Crc32,
Crc32C,
Crc64Nvme,
Md5,
Sha1,
Sha256,
Sha512,
Xxhash128,
Xxhash3,
Xxhash64,
Unknown(UnknownVariantValue),
}Expand description
When matching ChecksumAlgorithm, handle known variants and retain a wildcard
arm for values introduced by S3 after this crate was generated.
To recognize a value that is not yet a named variant, use as_str():
match value {
// Handle known variants here.
other if other.as_str() == "NewFeature" => { /* ... */ },
_ => { /* ... */ },
}This continues to recognize "NewFeature" if a future version of this crate
adds a named variant for it. Avoid matching Unknown directly: its inner
value is opaque, and that arm would no longer match the new named variant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Crc32
Crc32C
Crc64Nvme
Md5
Sha1
Sha256
Sha512
Xxhash128
Xxhash3
Xxhash64
Unknown(UnknownVariantValue)
👎Deprecated:
Don’t directly match on Unknown. See the docs on this enum for the correct way to handle unknown variants.
Unknown contains new variants that have been added since this code was generated.
Implementations§
Source§impl ChecksumAlgorithm
impl ChecksumAlgorithm
Sourcepub fn try_parse(value: &str) -> Result<Self, UnknownVariantError>
pub fn try_parse(value: &str) -> Result<Self, UnknownVariantError>
Parses the enum value while disallowing unknown variants.
Unknown variants will result in an error.
Trait Implementations§
Source§impl AsRef<str> for ChecksumAlgorithm
impl AsRef<str> for ChecksumAlgorithm
Source§impl Clone for ChecksumAlgorithm
impl Clone for ChecksumAlgorithm
Source§impl Debug for ChecksumAlgorithm
impl Debug for ChecksumAlgorithm
Source§impl Display for ChecksumAlgorithm
impl Display for ChecksumAlgorithm
impl Eq for ChecksumAlgorithm
Source§impl From<&ChecksumAlgorithm> for ChecksumAlgorithm
Available on crate feature sdk-v1 only.
impl From<&ChecksumAlgorithm> for ChecksumAlgorithm
Available on crate feature
sdk-v1 only.Source§fn from(value: &ChecksumAlgorithm) -> Self
fn from(value: &ChecksumAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<&ChecksumAlgorithm> for ChecksumAlgorithm
Available on crate feature sdk-v1 only.
impl From<&ChecksumAlgorithm> for ChecksumAlgorithm
Available on crate feature
sdk-v1 only.Source§fn from(value: &ChecksumAlgorithm) -> Self
fn from(value: &ChecksumAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<&str> for ChecksumAlgorithm
impl From<&str> for ChecksumAlgorithm
Source§impl From<ChecksumAlgorithm> for ChecksumAlgorithm
Available on crate feature sdk-v1 only.
impl From<ChecksumAlgorithm> for ChecksumAlgorithm
Available on crate feature
sdk-v1 only.Source§fn from(value: ChecksumAlgorithm) -> Self
fn from(value: ChecksumAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<ChecksumAlgorithm> for ChecksumAlgorithm
Available on crate feature sdk-v1 only.
impl From<ChecksumAlgorithm> for ChecksumAlgorithm
Available on crate feature
sdk-v1 only.Source§fn from(value: ChecksumAlgorithm) -> Self
fn from(value: ChecksumAlgorithm) -> Self
Converts to this type from the input type.
Source§impl FromStr for ChecksumAlgorithm
impl FromStr for ChecksumAlgorithm
Source§impl Hash for ChecksumAlgorithm
impl Hash for ChecksumAlgorithm
Source§impl Ord for ChecksumAlgorithm
impl Ord for ChecksumAlgorithm
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ChecksumAlgorithm
impl PartialEq for ChecksumAlgorithm
Source§impl PartialOrd for ChecksumAlgorithm
impl PartialOrd for ChecksumAlgorithm
impl StructuralPartialEq for ChecksumAlgorithm
Auto Trait Implementations§
impl Forget for ChecksumAlgorithm
impl Freeze for ChecksumAlgorithm
impl Move for ChecksumAlgorithm
impl RefUnwindSafe for ChecksumAlgorithm
impl Send for ChecksumAlgorithm
impl Sync for ChecksumAlgorithm
impl Unpin for ChecksumAlgorithm
impl UnsafeUnpin for ChecksumAlgorithm
impl UnwindSafe for ChecksumAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.