Struct ResolvedPluginEventRoute
pub struct ResolvedPluginEventRoute { /* private fields */ }Expand description
A transient host-resolved view of where one event is allowed to go.
The route is bound to the exact canonical instance ID requested from the
live resolver. agent names the already-configured owning agent when an
agent turn is requested. sop is a typed marker for matching the event
against the shared SOP engine; a plugin cannot name a SOP or an action.
Implementations§
Source§impl ResolvedPluginEventRoute
impl ResolvedPluginEventRoute
Sourcepub fn agent(
instance: &PluginInstanceId,
agent_alias: impl Into<String>,
) -> Result<Self, PluginEventError>
pub fn agent( instance: &PluginInstanceId, agent_alias: impl Into<String>, ) -> Result<Self, PluginEventError>
Route the event only to the owning agent’s shared turn lifecycle.
§Errors
Returns PluginEventError::InvalidRoute for an empty or
control-character-containing agent alias.
Sourcepub fn sop(instance: &PluginInstanceId) -> Self
pub fn sop(instance: &PluginInstanceId) -> Self
Route the event only to the shared SOP matcher.
Sourcepub fn sop_and_agent(
instance: &PluginInstanceId,
agent_alias: impl Into<String>,
) -> Result<Self, PluginEventError>
pub fn sop_and_agent( instance: &PluginInstanceId, agent_alias: impl Into<String>, ) -> Result<Self, PluginEventError>
Route the event to both the owning agent and the shared SOP matcher.
§Errors
Returns PluginEventError::InvalidRoute for an empty or
control-character-containing agent alias.
Sourcepub fn instance_id(&self) -> &PluginInstanceId
pub fn instance_id(&self) -> &PluginInstanceId
Canonical instance for which this route was resolved.
Sourcepub fn agent_alias(&self) -> Option<&str>
pub fn agent_alias(&self) -> Option<&str>
Owning agent selected by canonical host routing, when an agent turn is part of this route.
Sourcepub fn routes_to_sop(&self) -> bool
pub fn routes_to_sop(&self) -> bool
Whether the event must also enter the shared SOP matcher.
Trait Implementations§
Source§impl Clone for ResolvedPluginEventRoute
impl Clone for ResolvedPluginEventRoute
Source§fn clone(&self) -> ResolvedPluginEventRoute
fn clone(&self) -> ResolvedPluginEventRoute
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolvedPluginEventRoute
impl Debug for ResolvedPluginEventRoute
impl Eq for ResolvedPluginEventRoute
Source§impl PartialEq for ResolvedPluginEventRoute
impl PartialEq for ResolvedPluginEventRoute
impl StructuralPartialEq for ResolvedPluginEventRoute
Auto Trait Implementations§
impl Freeze for ResolvedPluginEventRoute
impl RefUnwindSafe for ResolvedPluginEventRoute
impl Send for ResolvedPluginEventRoute
impl Sync for ResolvedPluginEventRoute
impl Unpin for ResolvedPluginEventRoute
impl UnsafeUnpin for ResolvedPluginEventRoute
impl UnwindSafe for ResolvedPluginEventRoute
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.