Skip to main content

VariantType

Trait VariantType 

Source
pub trait VariantType {
    // Required method
    fn variant_type_id() -> VariantScalarTypeId;
}
Expand description

Trait for types that can be represented by a variant. Note that the VariantTypeId returned by variant_type_id must be the variant type ID of the variant returned by the corresponding From trait implementation!

Required Methods§

Source

fn variant_type_id() -> VariantScalarTypeId

The variant kind this type will be represented as.

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.

Implementations on Foreign Types§

Source§

impl VariantType for &str

Source§

impl VariantType for bool

Source§

impl VariantType for f32

Source§

impl VariantType for f64

Source§

impl VariantType for i8

Source§

impl VariantType for i16

Source§

impl VariantType for i32

Source§

impl VariantType for i64

Source§

impl VariantType for u8

Source§

impl VariantType for u16

Source§

impl VariantType for u32

Source§

impl VariantType for u64

Source§

impl VariantType for String

Source§

impl VariantType for DateTime<Utc>

Source§

impl VariantType for Uuid

Implementors§