pub struct FallibleBufferedInput<T: Iterator<Item = Result<char, ErrorKind>>> { /* private fields */ }Expand description
A buffered wrapper around a fallible iterator of characters.
The iterator uses its normal None return value for clean end-of-input and returns source
failures as Some(Err(error)), where error is an ErrorKind. The first error is latched,
parsing becomes terminal, and the underlying iterator is never polled again.
Implementations§
Trait Implementations§
Source§impl<T: Iterator<Item = Result<char, ErrorKind>>> BorrowedInput<'static> for FallibleBufferedInput<T>
FallibleBufferedInput is a streaming input and cannot provide stable borrowed slices.
impl<T: Iterator<Item = Result<char, ErrorKind>>> BorrowedInput<'static> for FallibleBufferedInput<T>
FallibleBufferedInput is a streaming input and cannot provide stable borrowed slices.
Source§impl<T: Iterator<Item = Result<char, ErrorKind>>> Input for FallibleBufferedInput<T>
impl<T: Iterator<Item = Result<char, ErrorKind>>> Input for FallibleBufferedInput<T>
Source§fn lookahead(&mut self, count: usize)
fn lookahead(&mut self, count: usize)
A hint to the input source that we will need to read
count characters. Read moreSource§fn buflen(&self) -> usize
fn buflen(&self) -> usize
Return the number of characters in the active lookahead window. Read more
Source§fn bufmaxlen(&self) -> usize
fn bufmaxlen(&self) -> usize
Return the maximum number of characters this input can buffer for lookahead.
Source§fn raw_read_ch(&mut self) -> char
fn raw_read_ch(&mut self) -> char
Read the next character from the logical input stream and return it directly. Read more
Source§fn raw_read_non_breakz_ch(&mut self) -> Option<char>
fn raw_read_non_breakz_ch(&mut self) -> Option<char>
Read a non-breakz character from the input stream and return it directly. Read more
Source§fn peek_nth(&self, n: usize) -> char
fn peek_nth(&self, n: usize) -> char
Return the
n-th character in the buffer, without consuming it. Read moreSource§fn take_source_error(&mut self) -> Option<ErrorKind>
fn take_source_error(&mut self) -> Option<ErrorKind>
Take a terminal error reported by the underlying source. Read more
Source§fn buf_is_empty(&self) -> bool
fn buf_is_empty(&self) -> bool
Return whether the active lookahead window is empty. Read more
Source§fn byte_offset(&self) -> Option<usize>
fn byte_offset(&self) -> Option<usize>
Return the current byte offset in the underlying source, if available. Read more
Source§fn slice_bytes(&self, _start: usize, _end: usize) -> Option<&str>
fn slice_bytes(&self, _start: usize, _end: usize) -> Option<&str>
Return a borrowed slice of the underlying source between two byte offsets. Read more
Source§fn may_contain_comments(&self) -> bool
fn may_contain_comments(&self) -> bool
Return whether this input may contain a
# character. Read moreSource§fn next_char_is(&self, c: char) -> bool
fn next_char_is(&self, c: char) -> bool
Return whether the next character in the input source is equal to
c. Read moreSource§fn next_2_are(&self, c1: char, c2: char) -> bool
fn next_2_are(&self, c1: char, c2: char) -> bool
Return whether the next 2 characters in the input source match the given characters. Read more
Source§fn next_3_are(&self, c1: char, c2: char, c3: char) -> bool
fn next_3_are(&self, c1: char, c2: char, c3: char) -> bool
Return whether the next 3 characters in the input source match the given characters. Read more
Source§fn next_is_document_indicator(&self) -> bool
fn next_is_document_indicator(&self) -> bool
Check whether the next characters correspond to a document indicator. Read more
Source§fn next_is_document_start(&self) -> bool
fn next_is_document_start(&self) -> bool
Check whether the next characters correspond to a start of document. Read more
Source§fn next_is_document_end(&self) -> bool
fn next_is_document_end(&self) -> bool
Check whether the next characters correspond to an end of document. Read more
Source§fn skip_ws_to_eol(
&mut self,
skip_tabs: SkipTabs,
) -> (usize, Result<SkipTabs, ErrorKind>)
fn skip_ws_to_eol( &mut self, skip_tabs: SkipTabs, ) -> (usize, Result<SkipTabs, ErrorKind>)
Skip YAML whitespace up to the end of the current line. Read more
Source§fn skip_ws_to_eol_blanks(&mut self, skip_tabs: SkipTabs) -> (usize, SkipTabs)
fn skip_ws_to_eol_blanks(&mut self, skip_tabs: SkipTabs) -> (usize, SkipTabs)
Skip YAML blank characters, stopping before comments, line breaks, or other content. Read more
Source§fn next_can_be_plain_scalar(&self, in_flow: bool) -> bool
fn next_can_be_plain_scalar(&self, in_flow: bool) -> bool
Check whether the next characters may be part of a plain scalar. Read more
Source§fn next_is_blank_or_break(&self) -> bool
fn next_is_blank_or_break(&self) -> bool
Source§fn next_is_blank_or_breakz(&self) -> bool
fn next_is_blank_or_breakz(&self) -> bool
Source§fn skip_while_non_breakz(&mut self) -> usize
fn skip_while_non_breakz(&mut self) -> usize
Source§fn skip_while_blank(&mut self) -> usize
fn skip_while_blank(&mut self) -> usize
Source§fn fetch_while_is_alpha(&mut self, out: &mut String) -> usize
fn fetch_while_is_alpha(&mut self, out: &mut String) -> usize
Fetch characters from the input while we encounter letters and store them in
out. Read moreSource§fn fetch_while_is_yaml_non_space(&mut self, out: &mut String) -> usize
fn fetch_while_is_yaml_non_space(&mut self, out: &mut String) -> usize
Fetch characters as long as they satisfy
is_yaml_non_space(c). Read moreAuto Trait Implementations§
impl<T> !RefUnwindSafe for FallibleBufferedInput<T>
impl<T> !UnwindSafe for FallibleBufferedInput<T>
impl<T> Freeze for FallibleBufferedInput<T>where
T: Freeze,
impl<T> Send for FallibleBufferedInput<T>where
T: Send,
impl<T> Sync for FallibleBufferedInput<T>where
T: Sync,
impl<T> Unpin for FallibleBufferedInput<T>where
T: Unpin,
impl<T> UnsafeUnpin for FallibleBufferedInput<T>where
T: UnsafeUnpin,
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