pub struct OwnedValue(/* private fields */);Expand description
An owned Value that can be cloned and shared.
Owned values don’t expose much API of their own but can be cheaply converted back into a Value through OwnedValue::by_ref.
Implementations§
Trait Implementations§
Source§impl Clone for OwnedValue
impl Clone for OwnedValue
Source§fn clone(&self) -> OwnedValue
fn clone(&self) -> OwnedValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedValue
impl Debug for OwnedValue
Source§impl Display for OwnedValue
impl Display for OwnedValue
Source§impl<'a> From<&'a OwnedValue> for Value<'a>
impl<'a> From<&'a OwnedValue> for Value<'a>
Source§fn from(value: &'a OwnedValue) -> Value<'a>
fn from(value: &'a OwnedValue) -> Value<'a>
Converts to this type from the input type.
Source§impl<'a> From<Value<'a>> for OwnedValue
impl<'a> From<Value<'a>> for OwnedValue
Source§fn from(value: Value<'a>) -> OwnedValue
fn from(value: Value<'a>) -> OwnedValue
Converts to this type from the input type.
Source§impl Serialize for OwnedValue
Available on crate feature serde only.
impl Serialize for OwnedValue
Available on crate feature
serde only.Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Value for OwnedValue
Available on crate feature sval only.
impl Value for OwnedValue
Available on crate feature
sval only.Source§fn stream<'sval, S>(&'sval self, stream: &mut S) -> Result<(), Error>
fn stream<'sval, S>(&'sval self, stream: &mut S) -> Result<(), Error>
Stream this value through a
Stream.Source§fn to_f32(&self) -> Option<f32>
fn to_f32(&self) -> Option<f32>
Try convert this value into a 32bit binary floating point number.
Auto Trait Implementations§
impl Freeze for OwnedValue
impl !RefUnwindSafe for OwnedValue
impl Send for OwnedValue
impl Sync for OwnedValue
impl Unpin for OwnedValue
impl !UnwindSafe for OwnedValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more