pub struct StructView<'a> {
pub fields: MapView<'a, &'a str, ValueView<'a>>,
pub __buffa_unknown_fields: UnknownFieldsView<'a>,
}Expand description
Struct represents a structured data value, consisting of fields
which map to dynamically typed values. In some languages, Struct
might be supported by a native representation. For example, in
scripting languages like JS a struct is represented as an
object. The details of that representation are described together
with the proto support for the language.
The JSON representation for Struct is JSON object.
Fields§
§fields: MapView<'a, &'a str, ValueView<'a>>Unordered map of dynamically typed values.
Field 1: fields (map)
__buffa_unknown_fields: UnknownFieldsView<'a>Trait Implementations§
Source§impl<'a> Clone for StructView<'a>
impl<'a> Clone for StructView<'a>
Source§fn clone(&self) -> StructView<'a>
fn clone(&self) -> StructView<'a>
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<'a> Debug for StructView<'a>
impl<'a> Debug for StructView<'a>
Source§impl<'a> Default for StructView<'a>
impl<'a> Default for StructView<'a>
Source§fn default() -> StructView<'a>
fn default() -> StructView<'a>
Returns the “default value” for a type. Read more
Source§impl DefaultViewInstance for StructView<'static>
impl DefaultViewInstance for StructView<'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 StructView<'a>
impl<'a> HasDefaultViewInstance for StructView<'a>
Source§type Static = StructView<'static>
type Static = StructView<'static>
The
'static instantiation of this view type.Source§fn default_view_ptr() -> *const u8
fn default_view_ptr() -> *const u8
Return a pointer to the static default instance, erasing the
lifetime so it can be used for any
'a.Source§impl<'a> MessageView<'a> for StructView<'a>
impl<'a> MessageView<'a> for StructView<'a>
Source§fn to_owned_message(&self) -> Struct
fn to_owned_message(&self) -> Struct
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 StructView<'a>
impl<'a> RefUnwindSafe for StructView<'a>
impl<'a> Send for StructView<'a>
impl<'a> Sync for StructView<'a>
impl<'a> Unpin for StructView<'a>
impl<'a> UnsafeUnpin for StructView<'a>
impl<'a> UnwindSafe for StructView<'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