pub trait ToRon where
    Self: Serialize
{ fn to_ron(&self) -> Result<String, Error> { ... } fn to_ron_pretty(
        &self,
        config: Option<PrettyConfig>
    ) -> Result<String, Error> { ... } }
Expand description

Trait with default methods that allow implementors parse them to RON format.

Provided Methods

Returns a RON from implementor.

Errors

Will return Error with kind ErrorKind::SerializingFailed if it fails to serialize this implementor.

Returns a pretty formatted RON from implementor.

Arguments

Optional config gives a PrettyConfig to use for formatting, with one set if None is provided.

Errors

Will return Error with kind ErrorKind::SerializingFailed if it fails to serialize implementor.

Implementors