pub enum PayloadSpec {
None,
Value(ValueType),
Fields {
fields: Vec<(String, ValueType)>,
required: Vec<String>,
},
}Expand description
Describes the expected shape of a message payload.
Variants§
None
No payload expected (value should be null).
Value(ValueType)
A single typed value.
Fields
Named fields with types. Some fields may be required.
Implementations§
Trait Implementations§
Source§impl Clone for PayloadSpec
impl Clone for PayloadSpec
Source§fn clone(&self) -> PayloadSpec
fn clone(&self) -> PayloadSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PayloadSpec
impl RefUnwindSafe for PayloadSpec
impl Send for PayloadSpec
impl Sync for PayloadSpec
impl Unpin for PayloadSpec
impl UnsafeUnpin for PayloadSpec
impl UnwindSafe for PayloadSpec
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