pub enum HexStr<'s, const N: usize, const P: bool = false, const U: bool = false> {
Owned(Vec<u8>),
Borrowed(&'s [u8]),
}
Expand description
Variants§
Implementations§
Trait Implementations§
Source§impl<const N: usize, const P: bool, const U: bool> StringExtT for HexStr<'_, N, P, U>
impl<const N: usize, const P: bool, const U: bool> StringExtT for HexStr<'_, N, P, U>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
With prefix.
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
With suffix.
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Encode the value to the string.
Source§impl<const N: usize, const P: bool, const U: bool> StringT for HexStr<'_, N, P, U>
impl<const N: usize, const P: bool, const U: bool> StringT for HexStr<'_, N, P, U>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
Push the value to the string (the underlying
Vec<u8>
).Source§fn encode_to_buf_with_separator(self, string: &mut Vec<u8>, separator: &str)
fn encode_to_buf_with_separator(self, string: &mut Vec<u8>, separator: &str)
Push the value to the string (the underlying
Vec<u8>
) with a
separator. Read moreSource§fn encode_to_bytes_buf(self, string: &mut BytesMut)
fn encode_to_bytes_buf(self, string: &mut BytesMut)
Push the value to the string (the underlying
bytes::BytesMut
).Auto Trait Implementations§
impl<'s, const N: usize, const P: bool, const U: bool> Freeze for HexStr<'s, N, P, U>
impl<'s, const N: usize, const P: bool, const U: bool> RefUnwindSafe for HexStr<'s, N, P, U>
impl<'s, const N: usize, const P: bool, const U: bool> Send for HexStr<'s, N, P, U>
impl<'s, const N: usize, const P: bool, const U: bool> Sync for HexStr<'s, N, P, U>
impl<'s, const N: usize, const P: bool, const U: bool> Unpin for HexStr<'s, N, P, U>
impl<'s, const N: usize, const P: bool, const U: bool> UnwindSafe for HexStr<'s, N, P, U>
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