pub trait ToVariant: Sized {
// Required methods
fn to_variant(&self) -> Variant;
fn from_variant(variant: &Variant) -> Option<Self>;
}
Expand description
Types that can be converted to and from a Variant
.
Required Methods§
fn to_variant(&self) -> Variant
fn from_variant(variant: &Variant) -> Option<Self>
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.