Struct nanoserde::TomlParser
source · Expand description
A parser for TOML string values.
let toml = "[Section]\nvalue=1";
let parsed = TomlParser::parse(toml).unwrap();
assert_eq!(parsed["Section.value"], Toml::Num(1.));Fields
cur: charline: usizecol: usizeImplementations
sourceimpl TomlParser
impl TomlParser
pub fn to_val(&mut self, tok: TomlTok, i: &mut Chars<'_>) -> Result<Toml, TomlErr>
pub fn parse_key_value(
&mut self,
local_scope: &String,
key: String,
i: &mut Chars<'_>,
out: &mut HashMap<String, Toml>
) -> Result<(), TomlErr>
pub fn next(&mut self, i: &mut Chars<'_>)
pub fn err_token(&self, tok: TomlTok) -> TomlErr
pub fn err_parse(&self, what: &str) -> TomlErr
pub fn next_tok(&mut self, i: &mut Chars<'_>) -> Result<TomlTok, TomlErr>
Trait Implementations
sourceimpl Default for TomlParser
impl Default for TomlParser
sourcefn default() -> TomlParser
fn default() -> TomlParser
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for TomlParser
impl Send for TomlParser
impl Sync for TomlParser
impl Unpin for TomlParser
impl UnwindSafe for TomlParser
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more