Skip to main content

Batch

Struct Batch 

Source
pub struct Batch<'a, V, const LANES: usize, const N: usize> { /* private fields */ }
Expand description

N actual slots reserved before any value is accepted.

Implementations§

Source§

impl<'a, V, const LANES: usize, const N: usize> Batch<'a, V, LANES, N>

Source

pub fn new(ledger: &'a mut Ledger<V, LANES>) -> Result<Self, Error<LANES>>

Source

pub fn publish<T, C>( self, items: [Item<T, LANES>; N], commit: C, ready: impl FnOnce(C), convert: impl FnMut(T) -> V, ) -> Result<(), (Error<LANES>, (C, [Item<T, LANES>; N]))>

Resolves the whole batch before consuming its commit capability or any value.

Source§

impl<'a, V, const LANES: usize> Batch<'a, V, LANES, 1>

Source

pub fn bind( self, lane: Index<LANES>, owner: u64, ) -> Result<Entry<'a, V, LANES>, Error<LANES>>

Auto Trait Implementations§

§

impl<'a, V, const LANES: usize, const N: usize> !RefUnwindSafe for Batch<'a, V, LANES, N>

§

impl<'a, V, const LANES: usize, const N: usize> !Send for Batch<'a, V, LANES, N>

§

impl<'a, V, const LANES: usize, const N: usize> !Sync for Batch<'a, V, LANES, N>

§

impl<'a, V, const LANES: usize, const N: usize> !UnwindSafe for Batch<'a, V, LANES, N>

§

impl<'a, V, const LANES: usize, const N: usize> Freeze for Batch<'a, V, LANES, N>
where Batch<'a, Entry<V>, EntryTag, LANES, N, { u32::MAX }, Count<LANES>>: Freeze, &'a mut Tree<LANES>: Freeze, &'a mut [u32; LANES]: Freeze,

§

impl<'a, V, const LANES: usize, const N: usize> Unpin for Batch<'a, V, LANES, N>
where Batch<'a, Entry<V>, EntryTag, LANES, N, { u32::MAX }, Count<LANES>>: Unpin, &'a mut Tree<LANES>: Unpin, &'a mut [u32; LANES]: Unpin,

§

impl<'a, V, const LANES: usize, const N: usize> UnsafeUnpin for Batch<'a, V, LANES, N>
where Batch<'a, Entry<V>, EntryTag, LANES, N, { u32::MAX }, Count<LANES>>: UnsafeUnpin, &'a mut Tree<LANES>: UnsafeUnpin, &'a mut [u32; LANES]: UnsafeUnpin,

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> Convert<T> for T

Source§

fn into(self) -> T

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.