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§
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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".