Struct short_hex_str::ShortHexStr [−][src]
pub struct ShortHexStr(_);Expand description
An efficient container for formatting a byte slice as a hex-formatted string, stored on the stack.
Using ShortHexStr instead of hex::encode is about 3-4x faster on a recent
MBP 2019 (~48 ns/iter vs ~170 ns/iter) in an artifical micro benchmark.
Implementations
Format a new ShortHexStr from a byte slice.
Returns Err(InputTooShortError) if the input byte slice length is less
than SOURCE_LENGTH bytes.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ShortHexStr
impl Send for ShortHexStr
impl Sync for ShortHexStr
impl Unpin for ShortHexStr
impl UnwindSafe for ShortHexStr
Blanket Implementations
Mutably borrows from an owned value. Read more