Enum cbor::value::Key [−] [src]

pub enum Key {
    Bool(bool),
    Bytes(Bytes),
    Int(Int),
    Text(Text),
}

CBOR allows heterogenous keys in objects. This enum unifies all currently allowed key types.

Variants

Bool
Bytes
Int
Text

Methods

impl Key

fn u64(n: u64) -> Key

fn i64(n: i64) -> Key

Trait Implementations

Derived Implementations

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 Ord for Key

fn cmp(&self, __arg_0: &Key) -> Ordering

impl Eq for Key

impl PartialOrd for Key

fn partial_cmp(&self, __arg_0: &Key) -> Option<Ordering>

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

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

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

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

impl PartialEq for Key

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

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

impl Debug for Key

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

impl Clone for Key

fn clone(&self) -> Key

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