buffex::ring_buffer

Struct Writer

source
pub struct Writer<B, P, T, D, O>(/* private fields */)
where
    B: Borrow<RingBuffer<P, T, D, O>>,
    P: BorrowMut<[T]>,
    T: Clone,
    D: TrAtomicData + Unsigned,
    O: TrCmpxchOrderings;

Implementations§

source§

impl<B, P, T, D, O> Writer<B, P, T, D, O>
where B: Borrow<RingBuffer<P, T, D, O>>, P: BorrowMut<[T]>, T: Clone, D: TrAtomicData + Unsigned, O: TrCmpxchOrderings,

source

pub fn can_write(&mut self) -> bool

source

pub fn try_write( &mut self, length: usize, ) -> Result<IoSliceMut<'_, T, Reclaim<'_, P, T, D, O>>, TxError<D>>

source

pub fn write_async(&mut self, length: usize) -> WriteAsync<'_, B, P, T, D, O>

source

pub fn buffer(&self) -> &RingBuffer<P, T, D, O>

Trait Implementations§

source§

impl<B, P, T, D, O> Borrow<RingBuffer<P, T, D, O>> for Writer<B, P, T, D, O>
where B: Borrow<RingBuffer<P, T, D, O>>, P: BorrowMut<[T]>, T: Clone, D: TrAtomicData + Unsigned, O: TrCmpxchOrderings,

source§

fn borrow(&self) -> &RingBuffer<P, T, D, O>

Immutably borrows from an owned value. Read more
source§

impl<B, P, T, D, O> Drop for Writer<B, P, T, D, O>
where B: Borrow<RingBuffer<P, T, D, O>>, P: BorrowMut<[T]>, T: Clone, D: TrAtomicData + Unsigned, O: TrCmpxchOrderings,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<B, P, T, D, O> TrAsyncRingBuffWriter<T> for Writer<B, P, T, D, O>
where B: Borrow<RingBuffer<P, T, D, O>>, P: BorrowMut<[T]>, T: Clone, D: TrAtomicData + Unsigned, O: TrCmpxchOrderings,

source§

type RingBuffer = RingBuffer<P, T, D, O>

source§

fn try_write( &mut self, length: usize, ) -> Result<<Self as TrBuffWriter<T>>::BuffMut<'_>, <Self as TrBuffWriter<T>>::Error>

source§

impl<B, P, T, D, O> TrBuffWriter<T> for Writer<B, P, T, D, O>
where B: Borrow<RingBuffer<P, T, D, O>>, P: BorrowMut<[T]>, T: Clone, D: TrAtomicData + Unsigned, O: TrCmpxchOrderings,

source§

type BuffMut<'a> = IoSliceMut<'a, T, Reclaim<'a, P, T, D, O>> where Self: 'a

source§

type Error = TxError<D>

source§

type WriteAsync<'a> = WriteAsync<'a, B, P, T, D, O> where Self: 'a

source§

fn can_write(&mut self) -> bool

source§

fn write_async(&mut self, length: usize) -> Self::WriteAsync<'_>

Auto Trait Implementations§

§

impl<B, P, T, D, O> Freeze for Writer<B, P, T, D, O>
where B: Freeze,

§

impl<B, P, T, D, O> !RefUnwindSafe for Writer<B, P, T, D, O>

§

impl<B, P, T, D, O> Send for Writer<B, P, T, D, O>
where B: Send,

§

impl<B, P, T, D, O> Sync for Writer<B, P, T, D, O>
where B: Sync,

§

impl<B, P, T, D, O> Unpin for Writer<B, P, T, D, O>
where B: Unpin, <D as TrAtomicData>::AtomicCell: Unpin, P: Unpin, T: Unpin,

§

impl<B, P, T, D, O> !UnwindSafe for Writer<B, P, T, D, O>

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 = 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.