Trait HexExt

Source
pub trait HexExt {
    // Required methods
    fn into_hex(self) -> Hex<Self>
       where Self: Sized;
    fn as_hex(&self) -> &Hex<Self>;
    fn as_hex_mut(&mut self) -> &mut Hex<Self>;
    fn into_upper_hex(self) -> UpperHex<Self>
       where Self: Sized;
    fn as_upper_hex(&self) -> &UpperHex<Self>;
    fn as_upper_hex_mut(&mut self) -> &mut UpperHex<Self>;
}
Expand description

Extension trait to make it more convenient to wrap byte sequence types with Hex and UpperHex. All methods this provides are also available via From implementations for Hex and UpperHex.

Required Methods§

Source

fn into_hex(self) -> Hex<Self>
where Self: Sized,

Source

fn as_hex(&self) -> &Hex<Self>

Source

fn as_hex_mut(&mut self) -> &mut Hex<Self>

Source

fn into_upper_hex(self) -> UpperHex<Self>
where Self: Sized,

Source

fn as_upper_hex(&self) -> &UpperHex<Self>

Source

fn as_upper_hex_mut(&mut self) -> &mut UpperHex<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> HexExt for T
where T: ?Sized,