Skip to main content

FromMetadataValue

Trait FromMetadataValue 

Source
pub trait FromMetadataValue: Sized {
    // Required method
    fn from_metadata_value(value: &Value) -> ValueResult<Self>;
}
Expand description

Converts metadata backing Value instances into supported Rust types.

This trait is implemented for the same concrete output types accepted by Value::to. It keeps metadata accessors generic without depending on qubit-value internal conversion traits.

Required Methods§

Source

fn from_metadata_value(value: &Value) -> ValueResult<Self>

Converts value into Self.

§Errors

Returns a qubit_value::ValueError when the stored value is absent, unsupported, or cannot be converted to 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.

Implementations on Foreign Types§

Source§

impl FromMetadataValue for Value

Source§

impl FromMetadataValue for bool

Source§

impl FromMetadataValue for char

Source§

impl FromMetadataValue for f32

Source§

impl FromMetadataValue for f64

Source§

impl FromMetadataValue for i8

Source§

impl FromMetadataValue for i16

Source§

impl FromMetadataValue for i32

Source§

impl FromMetadataValue for i64

Source§

impl FromMetadataValue for i128

Source§

impl FromMetadataValue for isize

Source§

impl FromMetadataValue for u8

Source§

impl FromMetadataValue for u16

Source§

impl FromMetadataValue for u32

Source§

impl FromMetadataValue for u64

Source§

impl FromMetadataValue for u128

Source§

impl FromMetadataValue for usize

Source§

impl FromMetadataValue for String

Source§

impl FromMetadataValue for Duration

Source§

impl FromMetadataValue for HashMap<String, String>

Source§

impl FromMetadataValue for BigDecimal

Source§

impl FromMetadataValue for DateTime<Utc>

Source§

impl FromMetadataValue for NaiveDate

Source§

impl FromMetadataValue for NaiveDateTime

Source§

impl FromMetadataValue for NaiveTime

Source§

impl FromMetadataValue for BigInt

Source§

impl FromMetadataValue for Url

Implementors§