pub trait Read<'de> {
// Required methods
fn position(&self) -> Position;
fn peek_n(&mut self, n: usize) -> Result<&[u8]>;
fn next(&mut self) -> Result<u8>;
fn parse_str<'s, F>(
&'s mut self,
escape: bool,
scratch: &'s mut Vec<u8>,
delimiter: F,
) -> Result<Reference<'de, 's, str>>
where F: Fn(&mut Self) -> Result<bool>;
// Provided methods
fn peek(&mut self) -> Result<u8> { ... }
fn peek2(&mut self) -> Result<(u8, u8)> { ... }
fn discard(&mut self, n: usize) -> Result<()> { ... }
fn peek_whitespace(&mut self) -> Result<Option<usize>> { ... }
fn starts_with_whitespace(&mut self) -> Result<bool> { ... }
fn peek_horizontal_whitespace(&mut self) -> Result<Option<usize>> { ... }
fn starts_with_horizontal_whitespace(&mut self) -> Result<bool> { ... }
}
Required Methods§
fn position(&self) -> Position
fn peek_n(&mut self, n: usize) -> Result<&[u8]>
fn next(&mut self) -> Result<u8>
fn parse_str<'s, F>( &'s mut self, escape: bool, scratch: &'s mut Vec<u8>, delimiter: F, ) -> Result<Reference<'de, 's, str>>
Provided Methods§
fn peek(&mut self) -> Result<u8>
fn peek2(&mut self) -> Result<(u8, u8)>
fn discard(&mut self, n: usize) -> Result<()>
fn peek_whitespace(&mut self) -> Result<Option<usize>>
fn starts_with_whitespace(&mut self) -> Result<bool>
fn peek_horizontal_whitespace(&mut self) -> Result<Option<usize>>
fn starts_with_horizontal_whitespace(&mut self) -> Result<bool>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.