pub struct WireOptionalString { /* private fields */ }
Expand description
An optional FIDL string
Implementations§
Source§impl WireOptionalString
impl WireOptionalString
Sourcepub fn encode_present(slot: Slot<'_, Self>, len: u64)
pub fn encode_present(slot: Slot<'_, Self>, len: u64)
Encodes that a string is present in a slot.
Sourcepub fn encode_absent(slot: Slot<'_, Self>)
pub fn encode_absent(slot: Slot<'_, Self>)
Encodes that a string is absent in a slot.
Sourcepub fn as_ref(&self) -> Option<&WireString>
pub fn as_ref(&self) -> Option<&WireString>
Returns a reference to the underlying string, if any.
Trait Implementations§
Source§impl Debug for WireOptionalString
impl Debug for WireOptionalString
Source§impl TakeFrom<WireOptionalString> for Option<String>
impl TakeFrom<WireOptionalString> for Option<String>
Source§fn take_from(from: &WireOptionalString) -> Self
fn take_from(from: &WireOptionalString) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.Source§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 moreSource§impl ZeroPadding for WireOptionalString
impl ZeroPadding for WireOptionalString
Source§unsafe fn zero_padding(ptr: *mut Self)
unsafe fn zero_padding(ptr: *mut Self)
Writes zeroes to the padding for this type, if any. Read more
Auto Trait Implementations§
impl Freeze for WireOptionalString
impl RefUnwindSafe for WireOptionalString
impl Send for WireOptionalString
impl Sync for WireOptionalString
impl Unpin for WireOptionalString
impl UnwindSafe for WireOptionalString
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