pub struct NumStr<const B: u8 = 10, const U: bool = false, const R: usize = 0, const M: usize = 0, T = usize>(/* private fields */);
Expand description
Number to string
§Generic
-
B
: the base of the number, should be within the range2..=16
. Default is 10. -
U
: whether to use uppercase for hex. Default is lowercase (false).For float number,
U
means whether only to reserve the integer part. -
R
: the resize length of the string. The overflow part will be truncated, and the insufficient part will be filled with ‘0’. Default is 0, or no resize. -
M
: the minimum length of the string, if the length of the string is less thanM
, fill with ‘0’. Default is 0, or no minimum. For signed numberM
will be ignored. -
T
: the underlying type of the number. Default isusize
.
§Panic
- Invalid base (== 0 or > 16)
Implementations§
Source§impl<T> NumStr<10, false, 0, 0, T>
impl<T> NumStr<10, false, 0, 0, T>
Sourcepub fn new_default(inner: T) -> Self
pub fn new_default(inner: T) -> Self
Source§impl NumStr<10, false, 0, 0, u8>
impl NumStr<10, false, 0, 0, u8>
Sourcepub fn hex_byte_default(inner: u8) -> NumStr<16, false, 2, 0, u8>
pub fn hex_byte_default(inner: u8) -> NumStr<16, false, 2, 0, u8>
§Create a new NumStr
with the given number, mostly for encoding bytes to hex.
With default settings of B
, U
, R
, M
:
B
:16
U
:false
R
:2
M
:0
See NumStr
for details.
§Notice
For negative number, R
, M
will not make sense
§Examples
let nums = vec![0x11, 0x45, 0x14, 0x19, 0x19, 0x81, 0x00]
.into_iter()
.map(NumStr::hex_byte_default);
assert_eq!(nums.to_string_ext(), "11451419198100");
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T> NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T> NumStr<B, U, R, M, T>
Sourcepub fn hexadecimal(self) -> NumStr<16, U, R, M, T>
pub fn hexadecimal(self) -> NumStr<16, U, R, M, T>
Convert to hexadecimal representation.
Sourcepub fn set_custom_base<const NB: u8>(self) -> NumStr<NB, U, R, M, T>
pub fn set_custom_base<const NB: u8>(self) -> NumStr<NB, U, R, M, T>
Set custom base.
The valid range is 2..=16
Sourcepub fn set_uppercase<const NU: bool>(self) -> NumStr<B, NU, R, M, T>
pub fn set_uppercase<const NU: bool>(self) -> NumStr<B, NU, R, M, T>
Set uppercase / lowercase of the number.
Default is lowercase
Note: only works for base > 10
Sourcepub fn set_resize_len<const NR: usize>(self) -> NumStr<B, U, NR, M, T>
pub fn set_resize_len<const NR: usize>(self) -> NumStr<B, U, NR, M, T>
Set whether to resize the string to len
length.
The overflow part will be truncated, and the insufficient part will be filled with ‘0’
Default is not resize
Note: see Vec::resize
for details
Sourcepub fn set_minimum_len<const NM: usize>(self) -> NumStr<B, U, R, NM, T>
pub fn set_minimum_len<const NM: usize>(self) -> NumStr<B, U, R, NM, T>
Set the minimum length of the string.
The insufficient part will be filled with ‘0’.
Default is not minimum
Note: if set Self::should_resize
, the minimum length will be ignored
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> NumStr<B, U, R, M, f32>
impl<const B: u8, const U: bool, const R: usize, const M: usize> NumStr<B, U, R, M, f32>
Sourcepub fn set_integer_only<const NU: bool>(self) -> NumStr<B, NU, R, M, f32>
pub fn set_integer_only<const NU: bool>(self) -> NumStr<B, NU, R, M, f32>
Set integer only mode.
Default disable.
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> NumStr<B, U, R, M, f64>
impl<const B: u8, const U: bool, const R: usize, const M: usize> NumStr<B, U, R, M, f64>
Sourcepub fn set_integer_only<const NU: bool>(self) -> NumStr<B, NU, R, M, f64>
pub fn set_integer_only<const NU: bool>(self) -> NumStr<B, NU, R, M, f64>
Set integer only mode.
Default disable.
Trait Implementations§
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T> AsRef<T> for NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T> AsRef<T> for NumStr<B, U, R, M, T>
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T: Clone> Clone for NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T: Clone> Clone for NumStr<B, U, R, M, T>
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T: Debug> Debug for NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T: Debug> Debug for NumStr<B, U, R, M, T>
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T> Deref for NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T> Deref for NumStr<B, U, R, M, T>
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T> DerefMut for NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T> DerefMut for NumStr<B, U, R, M, T>
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T: Ord> Ord for NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T: Ord> Ord for NumStr<B, U, R, M, T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T: PartialEq> PartialEq for NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T: PartialEq> PartialEq for NumStr<B, U, R, M, T>
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize, T: PartialOrd> PartialOrd for NumStr<B, U, R, M, T>
impl<const B: u8, const U: bool, const R: usize, const M: usize, T: PartialOrd> PartialOrd for NumStr<B, U, R, M, T>
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, usize>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, usize>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, f32>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, f32>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, f64>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, f64>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i128>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i128>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i16>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i16>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i32>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i32>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i64>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i64>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i8>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, i8>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, isize>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, isize>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u128>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u128>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u16>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u16>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u32>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u32>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u64>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u64>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u8>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringExtT for NumStr<B, U, R, M, u8>
Source§fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
fn with_prefix<P: StringExtT + Copy>(self, prefix: P) -> impl StringExtT
Source§fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
fn with_suffix<S: StringExtT + Copy>(self, suffix: S) -> impl StringExtT
Source§fn to_string_ext(self) -> String
fn to_string_ext(self) -> String
Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, usize>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, usize>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, f32>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, f32>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, f64>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, f64>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i128>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i128>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i16>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i16>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i32>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i32>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i64>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i64>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i8>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, i8>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, isize>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, isize>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u128>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u128>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u16>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u16>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u32>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u32>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u64>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u64>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).Source§impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u8>
impl<const B: u8, const U: bool, const R: usize, const M: usize> StringT for NumStr<B, U, R, M, u8>
Source§fn encode_to_buf(self, string: &mut Vec<u8>)
fn encode_to_buf(self, string: &mut Vec<u8>)
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)
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)
bytes::BytesMut
).