pub struct PayloadView { /* private fields */ }Expand description
A payload view belonging to one explicitly selected constructor.
Implementations§
Source§impl PayloadView
impl PayloadView
Sourcepub fn positional(&self, index: usize) -> Result<ContextCodec, DecodeError>
pub fn positional(&self, index: usize) -> Result<ContextCodec, DecodeError>
A positional payload member.
Sourcepub fn field(&self, name: &str) -> Result<ContextCodec, DecodeError>
pub fn field(&self, name: &str) -> Result<ContextCodec, DecodeError>
A named payload field.
Sourcepub fn decode_field(
&self,
parent: &Json,
name: &str,
) -> Result<Json, DecodeError>
pub fn decode_field( &self, parent: &Json, name: &str, ) -> Result<Json, DecodeError>
Reads a named member with substituted Option presence.
Sourcepub fn encode_field(
&self,
value: &Json,
name: &str,
) -> Result<Option<Json>, DecodeError>
pub fn encode_field( &self, value: &Json, name: &str, ) -> Result<Option<Json>, DecodeError>
Writes a named member with substituted Option presence.
Trait Implementations§
Source§impl Clone for PayloadView
impl Clone for PayloadView
Auto Trait Implementations§
impl Freeze for PayloadView
impl RefUnwindSafe for PayloadView
impl Send for PayloadView
impl Sync for PayloadView
impl Unpin for PayloadView
impl UnsafeUnpin for PayloadView
impl UnwindSafe for PayloadView
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