Skip to main content

PoolSlot

Struct PoolSlot 

Source
pub struct PoolSlot(/* private fields */);
Expand description

A slot the writer holds alone, to fill before it publishes it.

Implementations§

Source§

impl PoolSlot

Source

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

The slot, to write the payload in: its address is 4 past a multiple of 64, so that octet 4 on is aligned to 8.

Source

pub fn bytes(&self) -> &[u8] ⓘ

The slot, as Self::bytes_mut.

Source

pub fn publish(self, len: usize) -> PoolLoan

Publishes the first len octets of the slot: from then on it is only read.

Trait Implementations§

Source§

impl Debug for PoolSlot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for PoolSlot

§

impl Freeze for PoolSlot
where *const ArcInner<Pool> is !null: Freeze, PhantomData<ArcInner<Pool>>: Freeze,

§

impl Move for PoolSlot

§

impl RefUnwindSafe for PoolSlot

§

impl Send for PoolSlot
where Arc<Pool>: Send,

§

impl Sync for PoolSlot
where Arc<Pool>: Sync,

§

impl Unpin for PoolSlot
where Arc<Pool>: Unpin,

§

impl UnsafeUnpin for PoolSlot
where *const ArcInner<Pool> is !null: UnsafeUnpin, PhantomData<ArcInner<Pool>>: UnsafeUnpin,

§

impl UnwindSafe for PoolSlot

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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.