Struct sval_buffer::Value
source · 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> 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