pub trait SerializeAttributeAccess: Sized {
type Ok;
type Error: Error;
// Required methods
fn include_prefix(
&mut self,
should_include: IncludePrefix,
) -> Result<Self::Ok, Self::Error>;
fn preferred_prefix(
&mut self,
preferred_prefix: Option<Prefix<'_>>,
) -> Result<Self::Ok, Self::Error>;
fn end<S: Serialize>(self, value: &S) -> Result<Self::Ok, Self::Error>;
}Expand description
A type that can be used to serialize an attribute.
Required Associated Types§
Required Methods§
Sourcefn include_prefix(
&mut self,
should_include: IncludePrefix,
) -> Result<Self::Ok, Self::Error>
fn include_prefix( &mut self, should_include: IncludePrefix, ) -> Result<Self::Ok, Self::Error>
Set whether to enforce a prefix when serializing.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.