#[repr(u8)]pub enum Algorithm {
ChaCha20Poly1305 = 0,
AesCcm16_64_128 = 1,
AesCcm16_128_128 = 2,
A128GCM = 3,
A256GCM = 4,
}Expand description
Expressed as an enum for lack of type variables and/or the unsuitability of the NewAead::new method as a function pointer constructor due to its generic component.
(Possibly one could make a trait that only has an associated type, have it impl’d by the
algorithms as a ZST, have static single objects for each and pass them as &'static dyn, but
that makes them two pointers large. One could probably pick the vtable from trait object
pointers, but that’s deep unsafe territory.)
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnsafeUnpin for Algorithm
impl UnwindSafe for Algorithm
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