pub struct WireOptionalString<'buf> { /* private fields */ }
Expand description
An optional FIDL string
Implementations§
Source§impl<'buf> WireOptionalString<'buf>
impl<'buf> WireOptionalString<'buf>
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 take(&mut self) -> Option<WireString<'buf>>
pub fn take(&mut self) -> Option<WireString<'buf>>
Takes the string out of the option, if any.
Sourcepub fn as_ref(&self) -> Option<&WireString<'buf>>
pub fn as_ref(&self) -> Option<&WireString<'buf>>
Returns a reference to the underlying string, if any.
Sourcepub fn as_mut(&mut self) -> Option<&mut WireString<'buf>>
pub fn as_mut(&mut self) -> Option<&mut WireString<'buf>>
Returns a mutable reference to the underlying string, if any.
Trait Implementations§
Source§impl Debug for WireOptionalString<'_>
impl Debug for WireOptionalString<'_>
Source§impl<'buf> Default for WireOptionalString<'buf>
impl<'buf> Default for WireOptionalString<'buf>
Source§fn default() -> WireOptionalString<'buf>
fn default() -> WireOptionalString<'buf>
Returns the “default value” for a type. Read more
Source§impl TakeFrom<WireOptionalString<'_>> for Option<String>
impl TakeFrom<WireOptionalString<'_>> for Option<String>
Source§fn take_from(from: &mut WireOptionalString<'_>) -> Self
fn take_from(from: &mut WireOptionalString<'_>) -> Self
Converts from the given
T
, taking any resources that can’t be cloned.Auto Trait Implementations§
impl<'buf> Freeze for WireOptionalString<'buf>
impl<'buf> RefUnwindSafe for WireOptionalString<'buf>
impl<'buf> Send for WireOptionalString<'buf>
impl<'buf> Sync for WireOptionalString<'buf>
impl<'buf> Unpin for WireOptionalString<'buf>
impl<'buf> !UnwindSafe for WireOptionalString<'buf>
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