pub struct UnionValuePayload {
pub tag: String,
pub body: i32,
}Fields§
§tag: StringTag of the branch the decoder resolved, matching one of the
union-spec::branches[*].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: i32Underlying 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 moreAuto 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