Trait WithBoxedSerializer

Source
pub trait WithBoxedSerializer {
    // Required method
    fn serializer<'ser>(
        &'ser self,
        name: Option<&'ser str>,
        is_root: bool,
    ) -> Result<BoxedSerializer<'ser>, Error>;
}
Expand description

Trait that returns a boxed version of a Serializer for any type that implements WithSerializer.

Required Methods§

Source

fn serializer<'ser>( &'ser self, name: Option<&'ser str>, is_root: bool, ) -> Result<BoxedSerializer<'ser>, Error>

Initializes a new serializer from the passed value.

§Errors

Returns a suitable Error is the serializer could not be initialized.

Implementors§