pub struct EntityBounds {
pub publishers: usize,
pub service_servers: usize,
pub service_clients: usize,
pub action_clients: usize,
pub action_servers: usize,
}Expand description
phase-391 W5-endgame step 2c (issue 0857) — a component class’s declared upper bounds, PER ENTITY KIND, for sizing its cell registries at compile time.
The runtime’s per-class cell storage is static, so its registries pay
their CAPACITY whether or not entities fill it — and one publisher slot
costs ~1.35 KiB (the loan arena rides inside). The default is the
NROS_RUNTIME_MAX_CELL_ENTITIES knob per kind, which always works;
a class that declares its real bounds pays exactly what it uses.
Declaring FEWER than register() creates is a loud registration error
(registry full), never a silent drop.
Public and non-generic on purpose (the ExecutorSizing rule): the const
generics this feeds stay behind the nros::node! macro emission, so no
other language ever sees them.
Fields§
§publishers: usizePublishers this class creates (each slot ~1.35 KiB — the big one).
service_servers: usizeService servers (sizes the trampoline-context slab, not a registry).
service_clients: usizeService clients.
action_clients: usizeAction clients.
action_servers: usizeAction servers.
Implementations§
Source§impl EntityBounds
impl EntityBounds
Trait Implementations§
Source§impl Clone for EntityBounds
impl Clone for EntityBounds
Source§fn clone(&self) -> EntityBounds
fn clone(&self) -> EntityBounds
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EntityBounds
Source§impl Debug for EntityBounds
impl Debug for EntityBounds
impl Eq for EntityBounds
Source§impl PartialEq for EntityBounds
impl PartialEq for EntityBounds
Source§fn eq(&self, other: &EntityBounds) -> bool
fn eq(&self, other: &EntityBounds) -> bool
self and other values to be equal, and is used by ==.