Enum preserves::hex::HexFormatter
source · pub enum HexFormatter {
Lines(usize),
Packed,
}
Expand description
Utility for formatting binary data as hex.
Variants§
Lines(usize)
Produces LF-separated lines with a maximum of usize
hex digits in each line.
Packed
Simply packs hex digits in as tightly as possible.
Implementations§
source§impl HexFormatter
impl HexFormatter
sourcepub fn encode(&self, bs: &[u8]) -> String
pub fn encode(&self, bs: &[u8]) -> String
Encode bs
according to the given rules for `self; see HexFormatter.
Auto Trait Implementations§
impl Freeze for HexFormatter
impl RefUnwindSafe for HexFormatter
impl Send for HexFormatter
impl Sync for HexFormatter
impl Unpin for HexFormatter
impl UnwindSafe for HexFormatter
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