Skip to main content

AsValue

Trait AsValue 

Source
pub trait AsValue {
    // Required method
    fn as_value(&self) -> Value;
}
Expand description

§AsValue

implemented by types that can reflect their value

Required Methods§

Source

fn as_value(&self) -> Value

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsValue for &str

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for String

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for bool

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for f32

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for f64

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for i8

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for i16

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for i32

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for i64

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for u8

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for u16

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for u32

Source§

fn as_value(&self) -> Value

Source§

impl AsValue for u64

Source§

fn as_value(&self) -> Value

Source§

impl<A, B> AsValue for (A, B)
where A: Clone + Debug + ToType + ToValue + AsValue + 'static, B: Clone + Debug + ToType + ToValue + AsValue + 'static,

Source§

fn as_value(&self) -> Value

Source§

impl<K, V> AsValue for BTreeMap<K, V>
where K: TypeOf + AsValue, V: TypeOf + AsValue,

Source§

fn as_value(&self) -> Value

Source§

impl<K, V> AsValue for HashMap<K, V>
where K: TypeOf + AsValue, V: TypeOf + AsValue,

Source§

fn as_value(&self) -> Value

Source§

impl<T: AsValue, E: AsValue> AsValue for Result<T, E>

Source§

fn as_value(&self) -> Value

Source§

impl<T: AsValue> AsValue for Option<T>

Source§

fn as_value(&self) -> Value

Source§

impl<T> AsValue for &T
where T: Clone + AsValue + ToType,

Source§

fn as_value(&self) -> Value

Source§

impl<T> AsValue for &[T]
where T: Clone + TypeOf + AsValue,

Source§

fn as_value(&self) -> Value

Source§

impl<T> AsValue for Arc<T>
where T: Clone + AsValue + ToType,

Source§

fn as_value(&self) -> Value

Source§

impl<T> AsValue for Vec<T>
where T: Clone + TypeOf + AsValue,

Source§

fn as_value(&self) -> Value

Source§

impl<const N: usize, T> AsValue for [T; N]
where T: Clone + TypeOf + AsValue,

Source§

fn as_value(&self) -> Value

Implementors§