Skip to main content

AsValue

Trait AsValue 

Source
pub trait AsValue {
    type Output: Borrow<Value>;

    // Required method
    fn as_value(self) -> Self::Output;
}
Expand description

A trait for types that can be converted into a Value or allow accessing it as a reference.

Required Associated Types§

Source

type Output: Borrow<Value>

The type of the value. It needs to be able to be borrowed as a Value.

Required Methods§

Source

fn as_value(self) -> Self::Output

Converts the value into a type that can be borrowed as a Value.

Implementors§

Source§

impl<'a> AsValue for &'a Value

Source§

impl<T> AsValue for T
where Value: From<T>,