pub struct StrInput<'a> { /* private fields */ }
Expand description
A parser input that uses a &str
as source.
Implementations§
Trait Implementations§
Source§impl<'a> Input for StrInput<'a>
impl<'a> Input for StrInput<'a>
Source§fn lookahead(&mut self, x: usize)
fn lookahead(&mut self, x: usize)
A hint to the input source that we will need to read
count
characters. Read moreSource§fn buf_is_empty(&self) -> bool
fn buf_is_empty(&self) -> bool
Return whether the buffer (!= stream) is empty.
Source§fn raw_read_ch(&mut self) -> char
fn raw_read_ch(&mut self) -> char
Read a character from the 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 a 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 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, &'static str>)
fn skip_ws_to_eol( &mut self, skip_tabs: SkipTabs, ) -> (usize, Result<SkipTabs, &'static str>)
Skip yaml whitespace at most up to eol. Also skips comments. Advances the input. 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
Auto Trait Implementations§
impl<'a> Freeze for StrInput<'a>
impl<'a> RefUnwindSafe for StrInput<'a>
impl<'a> Send for StrInput<'a>
impl<'a> Sync for StrInput<'a>
impl<'a> Unpin for StrInput<'a>
impl<'a> UnwindSafe for StrInput<'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
Mutably borrows from an owned value. Read more