pub trait MaybeBinary<'c>where
    Self: From<Vec<u8>> + From<&'c [u8]> + TryInto<Vec<u8>, Error = DatumConversionFailure<Self>>,{
    // Required method
    fn try_as_bin(&self) -> Result<&[u8], TypeMismatch>;

    // Provided method
    fn try_into_binary(self) -> Result<Vec<u8>, TypeMismatch> { ... }
}
Expand description

Types that can be a binary blob

Required Methods§

source

fn try_as_bin(&self) -> Result<&[u8], TypeMismatch>

Try to interpret datum as binary (8 bit) string

Provided Methods§

source

fn try_into_binary(self) -> Result<Vec<u8>, TypeMismatch>

Try to convert datum into binary (8 bit) string

Implementors§