pub struct Bytes<'a, const FORMAT: u128> { /* private fields */ }
Expand description
Slice iterator that skips characters matching a given value.
This wraps an iterator over a contiguous block of memory, and only returns values that are not equal to skip.
The format allows us to dictate the actual behavior of the iterator: in what contexts does it skip digit separators.
FORMAT
is required to tell us what the digit separator is, and where
the digit separators are allowed, as well tell us the radix.
The radix is required to allow us to differentiate digit from
non-digit characters (see DigitSeparators
for a detailed explanation on why).
Implementations§
Source§impl<'a, const FORMAT: u128> Bytes<'a, FORMAT>
impl<'a, const FORMAT: u128> Bytes<'a, FORMAT>
Sourcepub fn integer_iter<'b>(&'b mut self) -> IntegerDigitsIterator<'a, 'b, FORMAT>
pub fn integer_iter<'b>(&'b mut self) -> IntegerDigitsIterator<'a, 'b, FORMAT>
Get iterator over integer digits.
Sourcepub fn fraction_iter<'b>(&'b mut self) -> FractionDigitsIterator<'a, 'b, FORMAT>
pub fn fraction_iter<'b>(&'b mut self) -> FractionDigitsIterator<'a, 'b, FORMAT>
Get iterator over fraction digits.
Sourcepub fn exponent_iter<'b>(&'b mut self) -> ExponentDigitsIterator<'a, 'b, FORMAT>
pub fn exponent_iter<'b>(&'b mut self) -> ExponentDigitsIterator<'a, 'b, FORMAT>
Get iterator over exponent digits.
Sourcepub fn special_iter<'b>(&'b mut self) -> SpecialDigitsIterator<'a, 'b, FORMAT>
pub fn special_iter<'b>(&'b mut self) -> SpecialDigitsIterator<'a, 'b, FORMAT>
Get iterator over special floating point values.
Trait Implementations§
Source§impl<'a, const FORMAT: u128> Iter<'a> for Bytes<'a, FORMAT>
impl<'a, const FORMAT: u128> Iter<'a> for Bytes<'a, FORMAT>
Source§const IS_CONTIGUOUS: bool = _
const IS_CONTIGUOUS: bool = _
If each yielded value is adjacent in memory.
Source§unsafe fn set_cursor(&mut self, index: usize)
unsafe fn set_cursor(&mut self, index: usize)
Source§fn current_count(&self) -> usize
fn current_count(&self) -> usize
Get the current number of digits returned by the iterator.
For contiguous iterators, this can include the sign character, decimal point, and the exponent sign (that is, it is always the cursor). For non-contiguous iterators, this must always be the only the number of digits returned.
Source§fn get_buffer(&self) -> &'a [u8] ⓘ
fn get_buffer(&self) -> &'a [u8] ⓘ
Source§unsafe fn step_by_unchecked(&mut self, count: usize)
unsafe fn step_by_unchecked(&mut self, count: usize)
N
elements. Read more