#[repr(C)]pub struct XabiOption {
pub size: usize,
pub abi_version: u32,
pub is_some: u8,
pub payload: XabiOwnedBytes,
}Expand description
Optional xabi payload.
is_some distinguishes None from Some(T) even when T encodes to an
empty payload, such as an empty string or empty byte vector.
Fields§
§size: usizeSize of this structure in bytes.
abi_version: u32ABI version for this structure.
is_some: u81 when payload contains an encoded value, 0 for None.
payload: XabiOwnedBytesOwned encoded payload for the contained value.
Implementations§
Source§impl XabiOption
impl XabiOption
Sourcepub const ABI_VERSION: u32 = ABI_VERSION
pub const ABI_VERSION: u32 = ABI_VERSION
ABI version expected by this structure.
Sourcepub fn some(payload: XabiOwnedBytes) -> Self
pub fn some(payload: XabiOwnedBytes) -> Self
Create a Some wire value from an encoded payload.
Trait Implementations§
Source§impl Clone for XabiOption
impl Clone for XabiOption
Source§fn clone(&self) -> XabiOption
fn clone(&self) -> XabiOption
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 moreimpl Copy for XabiOption
Auto Trait Implementations§
impl !Send for XabiOption
impl !Sync for XabiOption
impl Freeze for XabiOption
impl RefUnwindSafe for XabiOption
impl Unpin for XabiOption
impl UnsafeUnpin for XabiOption
impl UnwindSafe for XabiOption
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