pub struct DictionaryOptionalItem {
pub key: String,
pub value: Option<Box<WrappedCapabilityId>>,
}
Expand description
A key-value pair in a DictionaryRef
, where the value may be elided.
This is useful for APIs that may wish to omit the value, for example if it could not be
duplicated.
Fields§
§key: String
§value: Option<Box<WrappedCapabilityId>>
Trait Implementations§
Source§impl Debug for DictionaryOptionalItem
impl Debug for DictionaryOptionalItem
Source§impl Encodable for DictionaryOptionalItem
impl Encodable for DictionaryOptionalItem
Source§type Encoded = WireDictionaryOptionalItem
type Encoded = WireDictionaryOptionalItem
The wire type for the value.
§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
encoding instead of calling
encode
. Read moreSource§impl EncodableOption for Box<DictionaryOptionalItem>
impl EncodableOption for Box<DictionaryOptionalItem>
Source§type EncodedOption = WireBox<WireDictionaryOptionalItem>
type EncodedOption = WireBox<WireDictionaryOptionalItem>
The wire type for the optional value.
Source§impl<___E> Encode<___E> for DictionaryOptionalItemwhere
___E: InternalHandleEncoder + ?Sized + Encoder + HandleEncoder,
impl<___E> Encode<___E> for DictionaryOptionalItemwhere
___E: InternalHandleEncoder + ?Sized + Encoder + HandleEncoder,
Source§impl<___E> EncodeOption<___E> for Box<DictionaryOptionalItem>where
___E: Encoder + ?Sized,
DictionaryOptionalItem: Encode<___E>,
impl<___E> EncodeOption<___E> for Box<DictionaryOptionalItem>where
___E: Encoder + ?Sized,
DictionaryOptionalItem: Encode<___E>,
Source§fn encode_option(
this: Option<&mut Self>,
encoder: &mut ___E,
out: &mut MaybeUninit<Self::EncodedOption>,
) -> Result<(), EncodeError>
fn encode_option( this: Option<&mut Self>, encoder: &mut ___E, out: &mut MaybeUninit<Self::EncodedOption>, ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
Source§impl TakeFrom<WireDictionaryOptionalItem> for DictionaryOptionalItem
impl TakeFrom<WireDictionaryOptionalItem> for DictionaryOptionalItem
Source§fn take_from(from: &WireDictionaryOptionalItem) -> Self
fn take_from(from: &WireDictionaryOptionalItem) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read moreAuto Trait Implementations§
impl Freeze for DictionaryOptionalItem
impl RefUnwindSafe for DictionaryOptionalItem
impl Send for DictionaryOptionalItem
impl Sync for DictionaryOptionalItem
impl Unpin for DictionaryOptionalItem
impl UnwindSafe for DictionaryOptionalItem
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