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 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.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Slots
impl Freeze for Slots
impl RefUnwindSafe for Slots
impl Send for Slots
impl Sync for Slots
impl Unpin for Slots
impl UnsafeUnpin for Slots
impl UnwindSafe for Slots
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