pub struct TagLen(/* private fields */);Expand description
A tag length, carried in bytes.
There is deliberately no bits() constructor: a bit count that is not a
whole number of bytes would be the only new failure mode in this API, and
TagLen::bytes(32) already names the unit at the call site. RFC 9106’s
“256-bit tag” is written TagLen::bytes(32).
Like Memory, this validates nothing; ParamsBuilder::build does.
use argon2_rust::params::TagLen;
assert_eq!(TagLen::bytes(32).as_bytes(), 32);Implementations§
Trait Implementations§
impl Copy for TagLen
impl Eq for TagLen
Source§impl Ord for TagLen
impl Ord for TagLen
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
Source§impl PartialOrd for TagLen
impl PartialOrd for TagLen
impl StructuralPartialEq for TagLen
Auto Trait Implementations§
impl Freeze for TagLen
impl RefUnwindSafe for TagLen
impl Send for TagLen
impl Sync for TagLen
impl Unpin for TagLen
impl UnsafeUnpin for TagLen
impl UnwindSafe for TagLen
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