pub struct UnionValuePayload {
pub tag: String,
pub body: Box<SchemaValue>,
}Fields§
§tag: StringTag of the branch the decoder resolved, matching one of the
super::UnionBranch::tag values. Carried so receivers do not have
to re-run discriminator rules to know which branch was matched;
encoders must ensure it agrees with the body.
body: Box<SchemaValue>Underlying value. Its shape matches the resolved branch’s body type and (by construction) satisfies the branch’s discriminator rule.
Trait Implementations§
Source§impl Clone for UnionValuePayload
impl Clone for UnionValuePayload
Source§fn clone(&self) -> UnionValuePayload
fn clone(&self) -> UnionValuePayload
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 moreSource§impl Debug for UnionValuePayload
impl Debug for UnionValuePayload
Source§impl<'de> Deserialize<'de> for UnionValuePayload
impl<'de> Deserialize<'de> for UnionValuePayload
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnionValuePayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnionValuePayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromSchema for UnionValuePayload
impl FromSchema for UnionValuePayload
fn from_value(value: &SchemaValue) -> Result<UnionValuePayload, FromSchemaError>
Source§impl IntoSchema for UnionValuePayload
impl IntoSchema for UnionValuePayload
fn type_id() -> TypeId
fn register_in(builder: &mut SchemaBuilder) -> SchemaType
fn to_value(&self) -> SchemaValue
Source§impl PartialEq for UnionValuePayload
impl PartialEq for UnionValuePayload
Source§impl Serialize for UnionValuePayload
impl Serialize for UnionValuePayload
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for UnionValuePayload
Auto Trait Implementations§
impl Freeze for UnionValuePayload
impl RefUnwindSafe for UnionValuePayload
impl Send for UnionValuePayload
impl Sync for UnionValuePayload
impl Unpin for UnionValuePayload
impl UnsafeUnpin for UnionValuePayload
impl UnwindSafe for UnionValuePayload
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