[][src]Struct sval::value::OwnedValue

pub struct OwnedValue(_);

An owned value.

Owned values are safe to share and are cheap to clone.

Methods

impl OwnedValue
[src]

pub fn collect(
    v: impl Value
) -> Self
[src]

Get an owned value from an arbitrary Value.

The given value doesn't need to be Send + Sync + 'static.

The structure of the given value will be streamed into a shared datastructure. That means this method is more expensive for more complex values.

Prefer the from_shared method where possible.

pub fn from_shared(
    v: impl Into<Arc<dyn Value + Send + Sync>>
) -> Self
[src]

Get an owned value from an already shared Value.

The given value must be Send + Sync + 'static.

pub fn from_value(
    v: impl Value
) -> Self
[src]

Deprecated since 0.1.2:

use collect instead

Trait Implementations

impl Value for OwnedValue
[src]

Auto Trait Implementations

impl Send for OwnedValue

impl Sync for OwnedValue

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]