pub struct Value<'sval> { /* private fields */ }Expand description
An immutable buffered value.
This type is more compact than ValueBuf.
Implementations§
Source§impl<'sval> Value<'sval>
impl<'sval> Value<'sval>
Sourcepub fn collect(v: &'sval (impl Value + ?Sized)) -> Result<Self, Error>
pub fn collect(v: &'sval (impl Value + ?Sized)) -> Result<Self, Error>
Buffer a value.
This method will fail if the alloc feature is not enabled.
Sourcepub fn into_owned(self) -> Result<Value<'static>, Error>
pub fn into_owned(self) -> Result<Value<'static>, Error>
Fully buffer this value, including any internal borrowed data.
This method will fail if the alloc feature is not enabled.
Trait Implementations§
Source§impl<'a> Value for Value<'a>
impl<'a> Value for Value<'a>
Source§fn stream<'sval, S: Stream<'sval> + ?Sized>(
&'sval self,
stream: &mut S,
) -> Result
fn stream<'sval, S: Stream<'sval> + ?Sized>( &'sval self, stream: &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<'sval> Freeze for Value<'sval>
impl<'sval> RefUnwindSafe for Value<'sval>
impl<'sval> Send for Value<'sval>
impl<'sval> Sync for Value<'sval>
impl<'sval> Unpin for Value<'sval>
impl<'sval> UnwindSafe for Value<'sval>
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