pub struct Toml;Available on crate feature
toml and (crate features json or toml or yaml) only.Expand description
TOML, read by the toml crate. Its extension is toml.
Trait Implementations§
impl Copy for Toml
Source§impl Format for Toml
impl Format for Toml
Source§fn read(
&self,
text: &str,
limits: &Limits,
_reading: Reading,
) -> Result<Node, Refusal>
fn read( &self, text: &str, limits: &Limits, _reading: Reading, ) -> Result<Node, Refusal>
TOML forbids a duplicate key and has no merge key, so both readings give the same tree or refuse the same text.
Source§fn resolve<'a>(
&self,
scalar: &'a Scalar,
_tag: Option<&Tag>,
wanted: Wanted,
) -> Result<Resolved<'a>, Mismatch>
fn resolve<'a>( &self, scalar: &'a Scalar, _tag: Option<&Tag>, wanted: Wanted, ) -> Result<Resolved<'a>, Mismatch>
Resolves by the type the scalar’s syntax gave it, and never by its text. A scalar that carries no syntax, such as one another format built, is text.
Source§fn extensions(&self) -> &'static [&'static str]
fn extensions(&self) -> &'static [&'static str]
The file extensions the format reads, in lower case and without the
dot, such as
yaml and yml.Auto Trait Implementations§
impl Forget for Toml
impl Freeze for Toml
impl Move for Toml
impl RefUnwindSafe for Toml
impl Send for Toml
impl Sync for Toml
impl Unpin for Toml
impl UnsafeUnpin for Toml
impl UnwindSafe for Toml
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