pub struct SkillRegistry { /* private fields */ }Expand description
Live registry of skill transports and bound cards.
The registry owns the installed SkillTransports and the SkillCards
bound to them, and (with the cache/cassette features) the audit log of
skill calls. It is a cheaply clonable handle over shared state, so clones
observe the same registry. It is a live handle rather than a serializable
value; cards are projected through the skill/Card descriptor.
Implementations§
Source§impl SkillRegistry
impl SkillRegistry
Sourcepub fn install_transport(
&self,
transport: Arc<dyn SkillTransport>,
) -> Result<()>
pub fn install_transport( &self, transport: Arc<dyn SkillTransport>, ) -> Result<()>
Installs transport, keyed by its id, replacing any prior transport
with the same id.
Sourcepub fn bind_card(&self, cx: &mut Cx, card: SkillCard) -> Result<Value>
pub fn bind_card(&self, cx: &mut Cx, card: SkillCard) -> Result<Value>
Binds card to its installed transport and registers it as a callable.
Resolves the card’s transport, builds a SkillCallable, registers it
under the card’s symbol, publishes its browse claims, and stores the
card. Errors if the card’s transport is not installed. Returns the
registered callable value.
Trait Implementations§
Source§impl Clone for SkillRegistry
impl Clone for SkillRegistry
Source§fn clone(&self) -> SkillRegistry
fn clone(&self) -> SkillRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for SkillRegistry
impl Default for SkillRegistry
Source§fn default() -> SkillRegistry
fn default() -> SkillRegistry
Source§impl Object for SkillRegistry
impl Object for SkillRegistry
Source§fn display(&self, _cx: &mut Cx) -> Result<String>
fn display(&self, _cx: &mut Cx) -> Result<String>
Source§fn header(&self) -> &ObjectHeader
fn header(&self) -> &ObjectHeader
Source§fn op(&self, _key: &OpKey) -> Option<&dyn Op>
fn op(&self, _key: &OpKey) -> Option<&dyn Op>
key, if any.