pub struct Cons<T, U>(pub T, pub U);Expand description
Prepends an element to the cons-list, somewhat equivalent to the array [T, ...U].
Tuple Fields§
§0: T§1: UImplementations§
Trait Implementations§
Source§impl<T, U> AccessCount for Cons<T, U>where
T: AccessKind,
U: AccessCount,
impl<T, U> AccessCount for Cons<T, U>where
T: AccessKind,
U: AccessCount,
Source§fn writers(type_id: TypeId) -> usize
fn writers(type_id: TypeId) -> usize
Returns how many writers for the given type exist in this list.
Source§fn readers(type_id: TypeId) -> usize
fn readers(type_id: TypeId) -> usize
Returns how many readers for the given type exist in this list (both exclusive and non-exclusive).
Source§fn exclusive_readers(type_id: TypeId) -> usize
fn exclusive_readers(type_id: TypeId) -> usize
Returns how many exclusive readers for the given type exist in this list.
Source§impl<'a, T, U> ActorList<'a> for Cons<T, U>where
T: Actor<'a, StoreRequest: TupleConsToCons>,
U: ActorList<'a>,
<<T as Actor<'a>>::StoreRequest as TupleConsToCons>::Cons: AccessCount,
impl<'a, T, U> ActorList<'a> for Cons<T, U>where
T: Actor<'a, StoreRequest: TupleConsToCons>,
U: ActorList<'a>,
<<T as Actor<'a>>::StoreRequest as TupleConsToCons>::Cons: AccessCount,
Source§type StoreRequests = Cons<<<T as Actor<'a>>::StoreRequest as TupleConsToCons>::Cons, <U as ActorList<'a>>::StoreRequests>
type StoreRequests = Cons<<<T as Actor<'a>>::StoreRequest as TupleConsToCons>::Cons, <U as ActorList<'a>>::StoreRequests>
Actor::StoreRequest for the #[actor] generated types is a tuple-cons-list, for each actor in this list
convert its store requests into our nominal cons-list.
This doesn’t work with manual Actor implementations that have non-tuple-cons-list StoreRequests.
Source§type InitContexts = Cons<<T as Actor<'a>>::InitContext, <U as ActorList<'a>>::InitContexts>
type InitContexts = Cons<<T as Actor<'a>>::InitContext, <U as ActorList<'a>>::InitContexts>
For Actor::InitContext we just need to map directly to the associated type.
Source§impl<S> Datastore for Cons<Source, S>where
S: Slots,
Given a slot cons-list, combines it with a generational::Source to implement Datastore.
impl<S> Datastore for Cons<Source, S>where
S: Slots,
Given a slot cons-list, combines it with a generational::Source to implement Datastore.
Source§impl<T, U> NestedAccessCount for Cons<T, U>where
T: AccessCount,
U: NestedAccessCount,
impl<T, U> NestedAccessCount for Cons<T, U>where
T: AccessCount,
U: NestedAccessCount,
Source§fn writers(type_id: TypeId) -> usize
fn writers(type_id: TypeId) -> usize
Returns how many writers for the given type exist in this list of lists.
Source§fn readers(type_id: TypeId) -> usize
fn readers(type_id: TypeId) -> usize
Returns how many readers for the given type exist in this list of lists (both exclusive and
non-exclusive).
Source§fn exclusive_readers(type_id: TypeId) -> usize
fn exclusive_readers(type_id: TypeId) -> usize
Returns how many exclusive readers for the given type exist in this list of lists.
impl<T: Copy, U: Copy> Copy for Cons<T, U>
impl<T: Eq, U: Eq> Eq for Cons<T, U>
impl<T, U> StructuralPartialEq for Cons<T, U>
impl<'pin, T, U> Unpin for Cons<T, U>where
PinnedFieldsOf<__Cons<'pin, T, U>>: Unpin,
Auto Trait Implementations§
impl<T, U> Freeze for Cons<T, U>
impl<T, U> RefUnwindSafe for Cons<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Cons<T, U>
impl<T, U> Sync for Cons<T, U>
impl<T, U> UnwindSafe for Cons<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more