Struct SendGuard

Source
pub struct SendGuard<'a, M: Flat + ?Sized, B: AsyncWriteBuffer + 'a, const INIT: bool = true> { /* private fields */ }

Implementations§

Source§

impl<'a, M: Flat + ?Sized, B: AsyncWriteBuffer> SendGuard<'a, M, B>

Source

pub fn send(self) -> B::WriteAll<'a>

Source§

impl<'a, M: Flat + ?Sized, B: AsyncWriteBuffer + 'a> SendGuard<'a, M, B, false>

Source

pub fn as_bytes(&self) -> &[u8]

Source

pub fn as_mut_bytes(&mut self) -> &mut [u8]

Source

pub unsafe fn assume_init(self) -> SendGuard<'a, M, B>

§Safety

Underlying message data must be initialized.

Source

pub fn new_in_place( self, emplacer: impl Emplacer<M>, ) -> Result<SendGuard<'a, M, B>, Error>

Source§

impl<'a, M: Flat + FlatDefault + ?Sized, B: AsyncWriteBuffer + 'a> SendGuard<'a, M, B, false>

Source

pub fn default_in_place(self) -> Result<SendGuard<'a, M, B>, Error>

Trait Implementations§

Source§

impl<'a, M: Flat + ?Sized, B: AsyncWriteBuffer + 'a> Deref for SendGuard<'a, M, B>

Source§

type Target = M

The resulting type after dereferencing.
Source§

fn deref(&self) -> &M

Dereferences the value.
Source§

impl<'a, M: Flat + ?Sized, B: AsyncWriteBuffer + 'a> DerefMut for SendGuard<'a, M, B>

Source§

fn deref_mut(&mut self) -> &mut M

Mutably dereferences the value.
Source§

impl<'a, M: Flat + ?Sized, B: AsyncWriteBuffer, const INIT: bool> Unpin for SendGuard<'a, M, B, INIT>

Auto Trait Implementations§

§

impl<'a, M, B, const INIT: bool> Freeze for SendGuard<'a, M, B, INIT>
where M: ?Sized,

§

impl<'a, M, B, const INIT: bool> RefUnwindSafe for SendGuard<'a, M, B, INIT>

§

impl<'a, M, B, const INIT: bool> Send for SendGuard<'a, M, B, INIT>
where B: Send, M: ?Sized,

§

impl<'a, M, B, const INIT: bool> Sync for SendGuard<'a, M, B, INIT>
where B: Sync, M: ?Sized,

§

impl<'a, M, B, const INIT: bool = true> !UnwindSafe for SendGuard<'a, M, B, INIT>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.