pub enum PayloadType {
Bytes,
Value {
source: String,
rust_type: String,
},
}Expand description
Restricted representation of a payload field.
Variants§
Bytes
Borrow the original bytes without copying or exposing Debug output.
Value
An application-supplied representation of this descriptor field.
The generator checks the descriptor shape, path syntax and generated
Copy bound. It cannot resolve Rust type identity or inspect an opaque
value’s fields; the application must preserve the declared native-type,
validation and ownership invariants. Copy alone permits references.
The generated Eq/Hash/Debug bounds also apply to owning payload enums.
Fields
Trait Implementations§
Source§impl Clone for PayloadType
impl Clone for PayloadType
Source§impl Debug for PayloadType
impl Debug for PayloadType
Source§impl<'de> Deserialize<'de> for PayloadType
impl<'de> Deserialize<'de> for PayloadType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl TryFrom<&NativePayloadType> for PayloadType
impl TryFrom<&NativePayloadType> for PayloadType
Source§type Error = AdapterError
type Error = AdapterError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Forget for PayloadType
impl Freeze for PayloadType
impl Move for PayloadType
impl RefUnwindSafe for PayloadType
impl Send for PayloadType
impl Sync for PayloadType
impl Unpin for PayloadType
impl UnsafeUnpin for PayloadType
impl UnwindSafe for PayloadType
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