pub struct RecordIter<'a, T> { /* private fields */ }
Trait Implementations§
Source§impl<'a, T: Debug> Debug for RecordIter<'a, T>
impl<'a, T: Debug> Debug for RecordIter<'a, T>
Source§impl<'s, 'a, T> ParseIterator<'s> for RecordIter<'a, T>where
T: ParseIterator<'s>,
impl<'s, 'a, T> ParseIterator<'s> for RecordIter<'a, T>where
T: ParseIterator<'s>,
Source§type PointInTime = <T as ParseIterator<'s>>::PointInTime
type PointInTime = <T as ParseIterator<'s>>::PointInTime
The type that is used to store information about the current position.
Source§fn pit(&self) -> Self::PointInTime
fn pit(&self) -> Self::PointInTime
Returns the current position. Should be used in combination with
restore_pit
.Source§fn restore_pit(&mut self, pit: Self::PointInTime)
fn restore_pit(&mut self, pit: Self::PointInTime)
Restore to a given position. Read more
Source§unsafe fn is_valid_utf8() -> bool
unsafe fn is_valid_utf8() -> bool
Safety Read more
Source§fn advance_if<F>(&mut self, advance_if: F) -> Option<bool>
fn advance_if<F>(&mut self, advance_if: F) -> Option<bool>
Advances if
advance_if
returns true
.
Returns None
if the iterator is empty.Source§fn next(&mut self) -> Option<u8>
fn next(&mut self) -> Option<u8>
Returns the next byte if it exists and advances the internal position.
Source§fn next_if<F>(&mut self, next_if: F) -> Option<u8>
fn next_if<F>(&mut self, next_if: F) -> Option<u8>
Advances one if
next_if
returns true
.
Returns None
if did not advance.Source§fn peek(&mut self) -> Option<u8>
fn peek(&mut self) -> Option<u8>
Returns the next byte without advancing the internal position.
Source§fn peek_len(&mut self, len: usize) -> Option<&'s [u8]>where
Self: Sized,
fn peek_len(&mut self, len: usize) -> Option<&'s [u8]>where
Self: Sized,
Returns the next x bytes without advancing the internal position.
Source§fn peek_at(&mut self, pos: usize) -> Option<u8>
fn peek_at(&mut self, pos: usize) -> Option<u8>
Tries to get the byte at the given position, without advancing.
Source§fn ignore_byte(&mut self, byte: u8) -> IgnoreByte<'_, Self>where
Self: Sized,
fn ignore_byte(&mut self, byte: u8) -> IgnoreByte<'_, Self>where
Self: Sized,
Skips a given byte when calling next. Read more
Source§fn while_byte_fn<F>(&mut self, f: F) -> WhileByteFn<'_, Self, F>
fn while_byte_fn<F>(&mut self, f: F) -> WhileByteFn<'_, Self, F>
Advances while the function returns
true
.Source§fn consume(&mut self) -> &mut Self
fn consume(&mut self) -> &mut Self
Consumes until the iterator is empty.
Meaning that
advance
returns None.Source§fn consume_and_count(&mut self) -> usize
fn consume_and_count(&mut self) -> usize
Consumes until the iterator is empty,
and returns how many times advance got called.
Source§fn consume_len(&mut self, len: usize) -> Result<&mut Self, usize>
fn consume_len(&mut self, len: usize) -> Result<&mut Self, usize>
Consumes a given length. Returns how much was consumed if could
not consume all.
Source§fn consume_at_least(&mut self, len: usize) -> Result<&mut Self, usize>
fn consume_at_least(&mut self, len: usize) -> Result<&mut Self, usize>
Consumes until the iterator is empty.
Returns
Err(len)
if could not consume len
.Source§fn consume_at_least_and_count(&mut self, len: usize) -> Result<usize, usize>
fn consume_at_least_and_count(&mut self, len: usize) -> Result<usize, usize>
Consumes until the iterator is empty, returning how much was consumed.
Returns
Err(len)
if could not consume len
.Source§fn consume_while_byte_fn<F>(&mut self, f: F) -> &mut Self
fn consume_while_byte_fn<F>(&mut self, f: F) -> &mut Self
Consumes while the function returns
true
.Source§fn consume_while_byte(&mut self, byte: u8) -> &mut Selfwhere
Self: Sized,
fn consume_while_byte(&mut self, byte: u8) -> &mut Selfwhere
Self: Sized,
Consumes while a give
byte
is returned.Source§fn split_on_byte(&mut self, byte: u8) -> SplitOnByte<'_, Self>where
Self: Sized,
fn split_on_byte(&mut self, byte: u8) -> SplitOnByte<'_, Self>where
Self: Sized,
Splits the iterator at a given byte. Read more
fn count_byte(&mut self, byte: u8) -> usizewhere
Self: Sized,
Source§fn record(&mut self) -> RecordIter<'_, Self>where
Self: Sized,
fn record(&mut self) -> RecordIter<'_, Self>where
Self: Sized,
Starts a new
Recorder
which starts recording at this position.Source§fn to_slice(&self) -> &'s [u8] ⓘ
fn to_slice(&self) -> &'s [u8] ⓘ
Returns a slice from the start of recording until now. Read more
Source§unsafe fn to_str_unchecked(&self) -> &'s str
unsafe fn to_str_unchecked(&self) -> &'s str
Returns a
str
from the start of recording until the current position
without checking if the data is valid utf8. Read moreSource§fn to_str(&self) -> &'s str
fn to_str(&self) -> &'s str
Returns a
str
from the start of recording until the current position. Read moreSource§fn try_to_str(&self) -> Result<&'s str, Utf8Error>
fn try_to_str(&self) -> Result<&'s str, Utf8Error>
Returns a
str
from the start of recording until the current position. Read moreSource§fn consume_to_slice(&mut self) -> &'s [u8] ⓘ
fn consume_to_slice(&mut self) -> &'s [u8] ⓘ
Consumes the iterator and then returns a slice from the start of recording
until the current position. Read more
Source§unsafe fn consume_to_str_unchecked(&mut self) -> &'s str
unsafe fn consume_to_str_unchecked(&mut self) -> &'s str
Consumes the iterator and then returns a str from the start of recording
until the current position. Without checking if the underlying data
is valid utf8. Read more
Source§fn consume_to_str(&mut self) -> &'s str
fn consume_to_str(&mut self) -> &'s str
Consumes the iterator and then returns a str from the start of recording
until the current position. Read more
Source§fn consume_try_to_str(&mut self) -> Result<&'s str, Utf8Error>
fn consume_try_to_str(&mut self) -> Result<&'s str, Utf8Error>
Consumes the iterator and then returns a str from the start of recording
until the current position if the data is valid utf8. Read more
Source§fn expect_byte_fn<F>(&mut self, f: F) -> Result<&mut Self, Option<u8>>
fn expect_byte_fn<F>(&mut self, f: F) -> Result<&mut Self, Option<u8>>
Returns
&mut Self
if the function returns true
on the next byte.
Else returns the byte that was received.Source§fn expect_byte(&mut self, byte: u8) -> Result<&mut Self, Option<u8>>
fn expect_byte(&mut self, byte: u8) -> Result<&mut Self, Option<u8>>
Returns
&mut Self
if the function byte is equal to the next byte.
Else returns the actual byte that was received.Source§fn expect_none(&mut self) -> Result<&mut Self, u8>
fn expect_none(&mut self) -> Result<&mut Self, u8>
Returns
&mut Self
if the end was reached (next returns None).Auto Trait Implementations§
impl<'a, T> Freeze for RecordIter<'a, T>
impl<'a, T> RefUnwindSafe for RecordIter<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for RecordIter<'a, T>where
T: Send,
impl<'a, T> Sync for RecordIter<'a, T>where
T: Sync,
impl<'a, T> Unpin for RecordIter<'a, T>
impl<'a, T> !UnwindSafe for RecordIter<'a, T>
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