Struct rabbit::Key [] [src]

pub struct Key(_);

128-bit key

...
let key1: Key = [0u8; 16].into();
let key2: Key = byte_slice_with_len_eq_16.into();
let key3: Key = byte_slice_with_len_ne_16.into(); // Panic!

Trait Implementations

impl Deref for Key

type Target = [u8; 16]

fn deref(&self) -> &[u8; 16]

impl From<[u8; 16]> for Key

fn from(key: [u8; 16]) -> Key

impl<'a> From<&'a [u8]> for Key

Asserts that slice.len() == 16

fn from(slice: &[u8]) -> Key

Derived Implementations

impl Debug for Key

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Hash for Key

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Eq for Key

impl PartialEq for Key

fn eq(&self, __arg_0: &Key) -> bool

fn ne(&self, __arg_0: &Key) -> bool

impl Clone for Key

fn clone(&self) -> Key

fn clone_from(&mut self, source: &Self)