pub struct OwnedValueBag { /* private fields */ }
Expand description
Implementations§
source§impl OwnedValueBag
impl OwnedValueBag
sourcepub const fn by_ref(&self) -> ValueBag<'_>
pub const fn by_ref(&self) -> ValueBag<'_>
Get a regular ValueBag
from this type.
Once a ValueBag
has been buffered, it will behave
slightly differently when converted back:
fmt::Debug
won’t use formatting flags.serde::Serialize
will use the text-based representation.- The original type may change, so downcasting can stop producing results.
Make this value cheap to clone and share by internally storing it in an Arc
.
If the value is already shared then this method will simply clone it.
Trait Implementations§
source§impl Clone for OwnedValueBag
impl Clone for OwnedValueBag
source§fn clone(&self) -> OwnedValueBag
fn clone(&self) -> OwnedValueBag
Returns a copy 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 OwnedValueBag
impl Debug for OwnedValueBag
source§impl Display for OwnedValueBag
impl Display for OwnedValueBag
source§impl<'v> From<&'v OwnedValueBag> for ValueBag<'v>
impl<'v> From<&'v OwnedValueBag> for ValueBag<'v>
source§fn from(v: &'v OwnedValueBag) -> ValueBag<'v>
fn from(v: &'v OwnedValueBag) -> ValueBag<'v>
Converts to this type from the input type.
source§impl Serialize for OwnedValueBag
impl Serialize for OwnedValueBag
source§impl Value for OwnedValueBag
impl Value for OwnedValueBag
source§fn stream<'sval, S: Stream<'sval> + ?Sized>(&'sval self, s: &mut S) -> Result
fn stream<'sval, S: Stream<'sval> + ?Sized>(&'sval self, s: &mut S) -> Result
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 OwnedValueBag
impl !RefUnwindSafe for OwnedValueBag
impl Send for OwnedValueBag
impl Sync for OwnedValueBag
impl Unpin for OwnedValueBag
impl !UnwindSafe for OwnedValueBag
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)