pub struct Slots { /* private fields */ }Expand description
The slots of a service, for resolving a literal path to its slot’s.
Implementations§
Source§impl Slots
impl Slots
Sourcepub fn of<'a>(
schemas: impl IntoIterator<Item = &'a PluginSchema>,
untyped: &[String],
) -> Self
pub fn of<'a>( schemas: impl IntoIterator<Item = &'a PluginSchema>, untyped: &[String], ) -> Self
The slots of schemas (each namespace its whole path: activations,
static children, typed slots) and of the untyped slots’ paths.
Sourcepub fn add(&mut self, schema: &PluginSchema)
pub fn add(&mut self, schema: &PluginSchema)
Add one schema’s slots (its namespace its whole path).
Sourcepub fn add_untyped(&mut self, path: &str)
pub fn add_untyped(&mut self, path: &str)
Add an untyped slot’s path (tickets.{item}).
Sourcepub fn is_untyped_peer_slot(&self, path: &str) -> bool
pub fn is_untyped_peer_slot(&self, path: &str) -> bool
ONE-7: whether the slot at path (dyn.{peer}) is an untyped peer
slot — a #[peer] slot whose names route on into another service, so
no data of this one is reached through it: the gate decides it at the
door of the call dispatched. A typed peer slot, and a dynamic child’s
slot of either kind, are not.
Sourcepub fn resolve(&self, method: &str) -> Option<String>
pub fn resolve(&self, method: &str) -> Option<String>
The slot grant’s key for the literal method (solar.earth.info →
solar.{planet}.info; a peer slot’s host.integration.github.repos
→ host.{integration}.repos; through an untyped slot, the slot
itself, solar.{planet}), or None when no slot is on its way — a
static child that names a segment wins over the slot.