pub trait LocalDelivery:
Send
+ Sync
+ 'static {
// Required method
fn deliver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 PeerCtx,
dest_scope: Option<&'life2 Scope>,
msg: KernelMessage,
) -> Pin<Box<dyn Future<Output = KernelResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn authorize_subscribe<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_from: &'life1 PeerCtx,
_topic: &'life2 str,
_dest_scope: Option<&'life3 Scope>,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}Expand description
Sink for messages that arrived from a mesh peer and are bound for a local recipient.
Required Methods§
Sourcefn deliver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 PeerCtx,
dest_scope: Option<&'life2 Scope>,
msg: KernelMessage,
) -> Pin<Box<dyn Future<Output = KernelResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn deliver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 PeerCtx,
dest_scope: Option<&'life2 Scope>,
msg: KernelMessage,
) -> Pin<Box<dyn Future<Output = KernelResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deliver msg from from. dest_scope is the envelope’s
dest_scope as supplied by the peer: untrusted. Implementations
that have no tenants ignore it.
Provided Methods§
May from subscribe to topic (a mesh.subscribe control
message, which is consumed before delivery)? Default: yes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl LocalDelivery for A2ARouter
The collapsed (in-kernel) mode: scopes do not exist, the router decides.