Struct PluginEventRouter
pub struct PluginEventRouter { /* private fields */ }Expand description
Resolves and submits plugin events through one fail-closed host boundary.
Implementations§
Source§impl PluginEventRouter
impl PluginEventRouter
Sourcepub fn new(
resolver: PluginEventRouteResolver,
dispatcher: Arc<dyn PluginEventDispatcher>,
) -> Self
pub fn new( resolver: PluginEventRouteResolver, dispatcher: Arc<dyn PluginEventDispatcher>, ) -> Self
Build a router from live resolution and shared dispatch services.
Sourcepub async fn submit(
&self,
endpoint: &PluginChannelEndpoint,
message: ChannelMessage,
) -> Result<(), PluginEventError>
pub async fn submit( &self, endpoint: &PluginChannelEndpoint, message: ChannelMessage, ) -> Result<(), PluginEventError>
Resolve current ownership and authorization, then submit one event.
§Errors
Fails closed when the endpoint is not a channel capability, normalized message routing does not match the endpoint, no live route exists, live authorization denies the event, the resolver returns a route for a different instance, or the shared dispatcher fails.
Trait Implementations§
Source§impl Clone for PluginEventRouter
impl Clone for PluginEventRouter
Source§fn clone(&self) -> PluginEventRouter
fn clone(&self) -> PluginEventRouter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PluginEventRouter
impl !UnwindSafe for PluginEventRouter
impl Freeze for PluginEventRouter
impl Send for PluginEventRouter
impl Sync for PluginEventRouter
impl Unpin for PluginEventRouter
impl UnsafeUnpin for PluginEventRouter
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