Skip to main content

ComponentSlotStorage

Struct ComponentSlotStorage 

Source
pub struct ComponentSlotStorage<C: ExecutableNode, const N: usize = { crate::config::MAX_CLASS_INSTANCES }, const PUBS: usize = { crate::config::MAX_CELL_ENTITIES }, const SVCS: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTC: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTS: usize = { crate::config::MAX_CELL_ENTITIES }, const SSRV: usize = { crate::config::MAX_CELL_ENTITIES }> { /* private fields */ }
Expand description

phase-391 W5.3b — per-class slot storage the nros::node! macro emits.

One static of this type per macro expansion, so C is CONCRETE at the emission site and the storage is sized size_of::<TypedSlot<C>>() exactly — no byte-budget guessing on the FFI install path. The type is public API for the MACRO EMIT only; it never crosses the C ABI (the trampoline keeps its (ptr, ptr, ptr) -> i32 shape), which is what keeps the const-generic parameter legal under the “no const generics on FFI-visible types” rule.

N is the per-class INSTANCE cap: the launch path bakes one identity per plan node and can name the same class twice, so this is an array, not one slot. Taking past N is a registration error (take returns None), the same Full shape as the executor’s node table. Slots are one-shot — next never rewinds — so storage is never re-initialised under a stale reference.

Implementations§

Source§

impl<C: ExecutableNode, const N: usize, const PUBS: usize, const SVCS: usize, const ACTC: usize, const ACTS: usize, const SSRV: usize> ComponentSlotStorage<C, N, PUBS, SVCS, ACTC, ACTS, SSRV>

Source

pub const fn new() -> Self

Const constructor — the macro emits static STORE: ... = ...::new();.

Trait Implementations§

Source§

impl<C: ExecutableNode, const N: usize, const PUBS: usize, const SVCS: usize, const ACTC: usize, const ACTS: usize, const SSRV: usize> Sync for ComponentSlotStorage<C, N, PUBS, SVCS, ACTC, ACTS, SSRV>

Auto Trait Implementations§

§

impl<C, const N: usize = { crate::config::MAX_CLASS_INSTANCES }, const PUBS: usize = { crate::config::MAX_CELL_ENTITIES }, const SVCS: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTC: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTS: usize = { crate::config::MAX_CELL_ENTITIES }, const SSRV: usize = { crate::config::MAX_CELL_ENTITIES }> !Freeze for ComponentSlotStorage<C, N, PUBS, SVCS, ACTC, ACTS, SSRV>

§

impl<C, const N: usize = { crate::config::MAX_CLASS_INSTANCES }, const PUBS: usize = { crate::config::MAX_CELL_ENTITIES }, const SVCS: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTC: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTS: usize = { crate::config::MAX_CELL_ENTITIES }, const SSRV: usize = { crate::config::MAX_CELL_ENTITIES }> !RefUnwindSafe for ComponentSlotStorage<C, N, PUBS, SVCS, ACTC, ACTS, SSRV>

§

impl<C, const N: usize = { crate::config::MAX_CLASS_INSTANCES }, const PUBS: usize = { crate::config::MAX_CELL_ENTITIES }, const SVCS: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTC: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTS: usize = { crate::config::MAX_CELL_ENTITIES }, const SSRV: usize = { crate::config::MAX_CELL_ENTITIES }> !Send for ComponentSlotStorage<C, N, PUBS, SVCS, ACTC, ACTS, SSRV>

§

impl<C, const N: usize = { crate::config::MAX_CLASS_INSTANCES }, const PUBS: usize = { crate::config::MAX_CELL_ENTITIES }, const SVCS: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTC: usize = { crate::config::MAX_CELL_ENTITIES }, const ACTS: usize = { crate::config::MAX_CELL_ENTITIES }, const SSRV: usize = { crate::config::MAX_CELL_ENTITIES }> !UnwindSafe for ComponentSlotStorage<C, N, PUBS, SVCS, ACTC, ACTS, SSRV>

§

impl<C, const N: usize, const PUBS: usize, const SVCS: usize, const ACTC: usize, const ACTS: usize, const SSRV: usize> Unpin for ComponentSlotStorage<C, N, PUBS, SVCS, ACTC, ACTS, SSRV>
where <C as ExecutableNode>::State: Unpin,

§

impl<C, const N: usize, const PUBS: usize, const SVCS: usize, const ACTC: usize, const ACTS: usize, const SSRV: usize> UnsafeUnpin for ComponentSlotStorage<C, N, PUBS, SVCS, ACTC, ACTS, SSRV>

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.