pub struct Parser { /* private fields */ }
Expand description
Main JSON parser struct
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn with_encoding(encoding: Encoding) -> Self
pub fn with_encoding(encoding: Encoding) -> Self
Create a new instance of the parser using a specific Encoding
Sourcepub fn parse_file<PathLike: AsRef<Path>>(
&self,
path: PathLike,
) -> ParserResult<JsonValue<'_>>
pub fn parse_file<PathLike: AsRef<Path>>( &self, path: PathLike, ) -> ParserResult<JsonValue<'_>>
pub fn parse_bytes(&self, bytes: &[u8]) -> ParserResult<JsonValue<'_>>
pub fn parse_str(&self, str: &str) -> ParserResult<JsonValue<'_>>
Sourcepub fn parse_buffer(
&self,
buffer: &mut impl BufRead,
) -> ParserResult<JsonValue<'_>>
pub fn parse_buffer( &self, buffer: &mut impl BufRead, ) -> ParserResult<JsonValue<'_>>
Parse the contents of a buffer (e.g. implementation of BufRead)
pub fn parse( &self, chars: &mut impl Iterator<Item = char>, ) -> ParserResult<JsonValue<'_>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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