CborMapExtension

Trait CborMapExtension 

Source
pub trait CborMapExtension {
    // Required methods
    fn as_u16(
        &self,
        key: &str,
        error_message: &str,
    ) -> Result<u16, ProtocolError>;
    fn as_u8(&self, key: &str, error_message: &str) -> Result<u8, ProtocolError>;
    fn as_bool(
        &self,
        key: &str,
        error_message: &str,
    ) -> Result<bool, ProtocolError>;
    fn as_bytes(
        &self,
        key: &str,
        error_message: &str,
    ) -> Result<Vec<u8>, ProtocolError>;
    fn as_string(
        &self,
        key: &str,
        error_message: &str,
    ) -> Result<String, ProtocolError>;
    fn as_u64(
        &self,
        key: &str,
        error_message: &str,
    ) -> Result<u64, ProtocolError>;
}

Required Methods§

Source

fn as_u16(&self, key: &str, error_message: &str) -> Result<u16, ProtocolError>

Source

fn as_u8(&self, key: &str, error_message: &str) -> Result<u8, ProtocolError>

Source

fn as_bool(&self, key: &str, error_message: &str) -> Result<bool, ProtocolError>

Source

fn as_bytes( &self, key: &str, error_message: &str, ) -> Result<Vec<u8>, ProtocolError>

Source

fn as_string( &self, key: &str, error_message: &str, ) -> Result<String, ProtocolError>

Source

fn as_u64(&self, key: &str, error_message: &str) -> Result<u64, ProtocolError>

Implementations on Foreign Types§

Source§

impl CborMapExtension for &Vec<(Value, Value)>

Source§

fn as_u16(&self, key: &str, error_message: &str) -> Result<u16, ProtocolError>

Source§

fn as_u8(&self, key: &str, error_message: &str) -> Result<u8, ProtocolError>

Source§

fn as_bool(&self, key: &str, error_message: &str) -> Result<bool, ProtocolError>

Source§

fn as_bytes( &self, key: &str, error_message: &str, ) -> Result<Vec<u8>, ProtocolError>

Source§

fn as_string( &self, key: &str, error_message: &str, ) -> Result<String, ProtocolError>

Source§

fn as_u64(&self, key: &str, error_message: &str) -> Result<u64, ProtocolError>

Implementors§