[−][src]Struct kg_diag::MemCharReader
Methods
impl<'a> MemCharReader<'a>
[src]
pub fn new(input: &'a [u8]) -> MemCharReader<'a>
[src]
pub fn with_path<P: AsRef<Path> + ?Sized + 'a>(
path: &'a P,
input: &'a [u8]
) -> MemCharReader<'a>
[src]
path: &'a P,
input: &'a [u8]
) -> MemCharReader<'a>
Trait Implementations
impl<'a> Reader for MemCharReader<'a>
[src]
fn path(&self) -> Option<&Path>
[src]
fn len(&self) -> Option<usize>
[src]
fn position(&self) -> Position
[src]
fn eof(&self) -> bool
[src]
fn seek(&mut self, pos: Position) -> ParseResult<()>
[src]
fn input(&mut self) -> ParseResult<Cow<str>>
[src]
will panic in debug if slice is not a valid utf8
fn slice(&mut self, start: usize, end: usize) -> ParseResult<Cow<str>>
[src]
will panic in debug if slice is not a valid utf8
fn quote(
&mut self,
from: Position,
to: Position,
lines_before: u32,
lines_after: u32,
message: Cow<str>
) -> Quote
[src]
&mut self,
from: Position,
to: Position,
lines_before: u32,
lines_after: u32,
message: Cow<str>
) -> Quote
fn slice_pos(&mut self, from: Position, to: Position) -> ParseResult<Cow<str>>
[src]
fn reset(&mut self) -> ParseResult<()>
[src]
impl<'a> CharReader for MemCharReader<'a>
[src]
fn next_char(&mut self) -> ParseResult<Option<char>>
[src]
fn peek_char(&mut self, lookahead: usize) -> ParseResult<Option<char>>
[src]
fn peek_char_pos(
&mut self,
lookahead: usize
) -> ParseResult<Option<(char, Position)>>
[src]
&mut self,
lookahead: usize
) -> ParseResult<Option<(char, Position)>>
fn skip_chars(&mut self, skip: usize) -> ParseResult<()>
[src]
fn match_str(&mut self, s: &str) -> ParseResult<bool>
[src]
fn match_str_term(
&mut self,
s: &str,
f: &dyn Fn(Option<char>) -> bool
) -> ParseResult<bool>
[src]
&mut self,
s: &str,
f: &dyn Fn(Option<char>) -> bool
) -> ParseResult<bool>
fn match_str_term_mut(
&mut self,
s: &str,
f: &mut dyn FnMut(Option<char>) -> bool
) -> ParseResult<bool>
[src]
&mut self,
s: &str,
f: &mut dyn FnMut(Option<char>) -> bool
) -> ParseResult<bool>
fn match_char(&mut self, c: char) -> ParseResult<bool>
[src]
fn skip_whitespace(&mut self) -> ParseResult<()>
[src]
fn skip_whitespace_nonl(&mut self) -> ParseResult<()>
[src]
fn scan(&mut self, f: &dyn Fn(char) -> bool) -> ParseResult<Cow<str>>
[src]
fn scan_mut(&mut self, f: &mut dyn FnMut(char) -> bool) -> ParseResult<Cow<str>>
[src]
fn skip_until(&mut self, f: &dyn Fn(char) -> bool) -> ParseResult<()>
[src]
fn skip_until_mut(&mut self, f: &mut dyn FnMut(char) -> bool) -> ParseResult<()>
[src]
fn skip_while(&mut self, f: &dyn Fn(char) -> bool) -> ParseResult<()>
[src]
fn skip_while_mut(&mut self, f: &mut dyn FnMut(char) -> bool) -> ParseResult<()>
[src]
impl<'a> Clone for MemCharReader<'a>
[src]
fn clone(&self) -> MemCharReader<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for MemCharReader<'a>
[src]
Auto Trait Implementations
impl<'a> Sync for MemCharReader<'a>
impl<'a> Send for MemCharReader<'a>
impl<'a> Unpin for MemCharReader<'a>
impl<'a> RefUnwindSafe for MemCharReader<'a>
impl<'a> UnwindSafe for MemCharReader<'a>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,