Struct lexical_util::iterator::Bytes
source · pub struct Bytes<'a, const __: u128> { /* private fields */ }
Expand description
Slice iterator that stores the original length of the slice.
Implementations§
source§impl<'a, const __: u128> Bytes<'a, __>
impl<'a, const __: u128> Bytes<'a, __>
sourcepub const IS_CONTIGUOUS: bool = true
pub const IS_CONTIGUOUS: bool = true
If each yielded value is adjacent in memory.
sourcepub unsafe fn set_cursor(&mut self, index: usize)
pub unsafe fn set_cursor(&mut self, index: usize)
sourcepub fn current_count(&self) -> usize
pub fn current_count(&self) -> usize
Get the current number of values returned by the iterator.
sourcepub fn is_done(&self) -> bool
pub fn is_done(&self) -> bool
Get if the buffer underlying the iterator is empty.
Same as is_consumed
.
sourcepub unsafe fn read_unchecked<V>(&self) -> V
pub unsafe fn read_unchecked<V>(&self) -> V
Read a value of a difference type from the iterator. This advances the internal state of the iterator.
§Safety
Safe as long as the number of the buffer is contains as least as many bytes as the size of V.
sourcepub fn read<V>(&self) -> Option<V>
pub fn read<V>(&self) -> Option<V>
Try to read a value of a different type from the iterator. This advances the internal state of the iterator.
sourcepub fn case_insensitive_first_is(&mut self, value: u8) -> bool
pub fn case_insensitive_first_is(&mut self, value: u8) -> bool
Check if the next element is a given value without case sensitivity.
sourcepub fn integer_iter<'b>(&'b mut self) -> BytesIterator<'a, 'b, __>
pub fn integer_iter<'b>(&'b mut self) -> BytesIterator<'a, 'b, __>
Get iterator over integer digits.
sourcepub fn fraction_iter<'b>(&'b mut self) -> BytesIterator<'a, 'b, __>
pub fn fraction_iter<'b>(&'b mut self) -> BytesIterator<'a, 'b, __>
Get iterator over fraction digits.
sourcepub fn exponent_iter<'b>(&'b mut self) -> BytesIterator<'a, 'b, __>
pub fn exponent_iter<'b>(&'b mut self) -> BytesIterator<'a, 'b, __>
Get iterator over exponent digits.
sourcepub fn special_iter<'b>(&'b mut self) -> BytesIterator<'a, 'b, __>
pub fn special_iter<'b>(&'b mut self) -> BytesIterator<'a, 'b, __>
Get iterator over special floating point values.
sourcepub unsafe fn step_by_unchecked(&mut self, count: usize)
pub unsafe fn step_by_unchecked(&mut self, count: usize)
Advance the byte by N
elements.
§Safety
As long as the iterator is at least N
elements, this
is safe.
sourcepub unsafe fn step_unchecked(&mut self)
pub unsafe fn step_unchecked(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<'a, const __: u128> Freeze for Bytes<'a, __>
impl<'a, const __: u128> RefUnwindSafe for Bytes<'a, __>
impl<'a, const __: u128> Send for Bytes<'a, __>
impl<'a, const __: u128> Sync for Bytes<'a, __>
impl<'a, const __: u128> Unpin for Bytes<'a, __>
impl<'a, const __: u128> UnwindSafe for Bytes<'a, __>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)