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§
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>
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.