pub struct ValueView<'a> {
pub kind: Option<KindView<'a>>,
pub __buffa_unknown_fields: UnknownFieldsView<'a>,
}Expand description
Value represents a dynamically typed value which can be either
null, a number, a string, a boolean, a recursive struct value, or a
list of values. A producer of value is expected to set one of these
variants. Absence of any variant indicates an error.
The JSON representation for Value is JSON value.
Fields§
§kind: Option<KindView<'a>>§__buffa_unknown_fields: UnknownFieldsView<'a>Trait Implementations§
Source§impl DefaultViewInstance for ValueView<'static>
impl DefaultViewInstance for ValueView<'static>
Source§fn default_view_instance() -> &'static Self
fn default_view_instance() -> &'static Self
Return a reference to the single default view instance.
Source§impl<'a> HasDefaultViewInstance for ValueView<'a>
impl<'a> HasDefaultViewInstance for ValueView<'a>
Source§impl<'a> MessageView<'a> for ValueView<'a>
impl<'a> MessageView<'a> for ValueView<'a>
Source§fn to_owned_message(&self) -> Value
fn to_owned_message(&self) -> Value
Convert this view to the owned message type.
Source§fn decode_view(buf: &'a [u8]) -> Result<Self, DecodeError>
fn decode_view(buf: &'a [u8]) -> Result<Self, DecodeError>
Decode a view from a buffer, borrowing string/bytes fields directly. Read more
Source§fn decode_view_with_limit(
buf: &'a [u8],
depth: u32,
) -> Result<Self, DecodeError>
fn decode_view_with_limit( buf: &'a [u8], depth: u32, ) -> Result<Self, DecodeError>
Decode a view with a custom recursion depth limit. Read more
Auto Trait Implementations§
impl<'a> Freeze for ValueView<'a>
impl<'a> RefUnwindSafe for ValueView<'a>
impl<'a> Send for ValueView<'a>
impl<'a> Sync for ValueView<'a>
impl<'a> Unpin for ValueView<'a>
impl<'a> UnsafeUnpin for ValueView<'a>
impl<'a> UnwindSafe for ValueView<'a>
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