Skip to main content

Table

Struct Table 

Source
pub struct Table<K: Kind>(/* private fields */);
Expand description

One side’s table of the values of kind K. A message written or read with it in its context (Context) refers to them by key.

Implementations§

Source§

impl<K: Kind> Table<K>

Source

pub fn new(role: Role) -> Self

Trait Implementations§

Source§

impl<K: Kind> Context for Table<K>

Source§

fn provide<'a>(&'a mut self, request: &mut Request<'a>)

Gives request the part it asks for, if this context has it.
Source§

impl<K: Kind> ErasedTable for Table<K>

Source§

fn commit(&mut self)

Keeps the keys given since the last commit or rollback: the message that gave them was sent.
Source§

fn rollback(&mut self)

Takes back the keys given since the last commit or rollback, so that a message that wasn’t sent defines nothing.
Source§

fn forget_dead(&mut self) -> Vec<u64>

The keys of the values that died on the origin side, for the other side to forget.
Source§

fn forget(&mut self, keys: &[u64])

Drops the copies of the values the origin lists as dead.

Auto Trait Implementations§

§

impl<K> Forget for Table<K>

§

impl<K> Freeze for Table<K>

§

impl<K> Move for Table<K>

§

impl<K> RefUnwindSafe for Table<K>

§

impl<K> Send for Table<K>
where RawTable<(usize, (Weak<<K as Kind>::Value>, u64))>: Send, RawTable<(u64, Weak<<K as Kind>::Value>)>: Send, RawVecInner: Send, Weak<<K as Kind>::Value>: Send, RawTable<(u64, Arc<<K as Kind>::Value>)>: Send, RawTable<(usize, u64)>: Send,

§

impl<K> Sync for Table<K>
where RawTable<(usize, (Weak<<K as Kind>::Value>, u64))>: Sync, RawTable<(u64, Weak<<K as Kind>::Value>)>: Sync, RawVecInner: Sync, Weak<<K as Kind>::Value>: Sync, RawTable<(u64, Arc<<K as Kind>::Value>)>: Sync, RawTable<(usize, u64)>: Sync,

§

impl<K> Unpin for Table<K>
where *const u8 is !null: Unpin, *const ArcInner<<K as Kind>::Value> is !null: Unpin, Arc<<K as Kind>::Value>: Unpin,

§

impl<K> UnsafeUnpin for Table<K>

§

impl<K> UnwindSafe for Table<K>

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.