pub struct HexStr<T> {
pub val: T,
pub add_0x_with_encoding: bool,
pub hex_in_caps: bool,
pub delimiter_after_nibble_count: usize,
pub delimiter: char,
pub skip_last_0_values: bool,
}
Expand description
HexStr<T>
A hex string. Has fields used in serializing whether to add a 0x to the encoding
and to make the hex value in capital letters or not.
Can be dereferenced to its value.
Fields§
§val: T
Value of the hex string. Can be dereferenced
add_0x_with_encoding: bool
Flag to add 0x when serializing the value
hex_in_caps: bool
Flag to serialize the hex in capital letters
delimiter_after_nibble_count: usize
Flag to split every n amount of nibbles with a delimiter
delimiter: char
Split every n amount of nibbles with this delimiter
skip_last_0_values: bool
Skip last 0 values. Whether or not to include 0 values
Methods from Deref<Target = u16>§
pub const MIN: u16 = 0u16
pub const MAX: u16 = 65_535u16
pub const BITS: u32 = 16u32
Trait Implementations§
source§impl<'de> Deserialize<'de> for HexStr<u128>
impl<'de> Deserialize<'de> for HexStr<u128>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de> Deserialize<'de> for HexStr<u16>
impl<'de> Deserialize<'de> for HexStr<u16>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de> Deserialize<'de> for HexStr<u32>
impl<'de> Deserialize<'de> for HexStr<u32>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de> Deserialize<'de> for HexStr<u64>
impl<'de> Deserialize<'de> for HexStr<u64>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de> Deserialize<'de> for HexStr<u8>
impl<'de> Deserialize<'de> for HexStr<u8>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: PartialEq> PartialEq for HexStr<T>
impl<T: PartialEq> PartialEq for HexStr<T>
impl<T: Eq> Eq for HexStr<T>
impl<T> StructuralEq for HexStr<T>
impl<T> StructuralPartialEq for HexStr<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for HexStr<T>where
T: RefUnwindSafe,
impl<T> Send for HexStr<T>where
T: Send,
impl<T> Sync for HexStr<T>where
T: Sync,
impl<T> Unpin for HexStr<T>where
T: Unpin,
impl<T> UnwindSafe for HexStr<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more