pub enum KeyLength {
Bytes8,
Bytes16,
Bytes24,
Bytes32,
Bytes64,
Bytes128,
Bytes256,
Bytes512,
Bytes1024,
Bytes2048,
Bytes4096,
}Expand description
re-exports The length of a key in bytes needed by a cryptography algorithm
§Examples
let foo = KeyLength::Bytes32;
assert_eq!(foo, KeyLength::Bytes32);Variants§
Bytes8
A Key length of 8 bytes
Bytes16
A Key length of 16 bytes
Bytes24
A Key length of 24 bytes
Bytes32
A Key length of 32 bytes
Bytes64
A Key length of 64 bytes
Bytes128
A Key length of 128 bytes
Bytes256
A Key length of 256 bytes
Bytes512
A Key length of 512 bytes
Bytes1024
A Key length of 1024 bytes
Bytes2048
A Key length of 2048 bytes
Bytes4096
A Key length of 4096 bytes
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyLength
impl<'de> Deserialize<'de> for KeyLength
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for KeyLength
impl Error for KeyLength
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
impl Eq for KeyLength
impl StructuralPartialEq for KeyLength
Auto Trait Implementations§
impl Freeze for KeyLength
impl RefUnwindSafe for KeyLength
impl Send for KeyLength
impl Sync for KeyLength
impl Unpin for KeyLength
impl UnwindSafe for KeyLength
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