pub struct ChannelSendRoutes { /* private fields */ }Expand description
Per-runtime routes, keyed by an exact custom address kind.
Register before runtime construction. Cloning copies the registration map and shares its callbacks; later registrations do not alter an existing clone.
Implementations§
Source§impl ChannelSendRoutes
impl ChannelSendRoutes
Sourcepub fn register(
&mut self,
kind: impl Into<String>,
route: Arc<dyn ChannelSendRoute>,
) -> RuntimeResult<()>
pub fn register( &mut self, kind: impl Into<String>, route: Arc<dyn ChannelSendRoute>, ) -> RuntimeResult<()>
Register an exact kind without replacing a route, a built-in transport, or a local actor address kind.
Sourcepub fn resolve(
&self,
recipient: &str,
) -> RuntimeResult<Option<Arc<dyn ChannelSendRoute>>>
pub fn resolve( &self, recipient: &str, ) -> RuntimeResult<Option<Arc<dyn ChannelSendRoute>>>
Select only an explicitly registered kind:address route.
Matching is exact. Surrounding whitespace on a registered address is a refusal, not an invitation to normalize it or fall back to a local write. Unregistered recipients retain the comm pack’s existing handling.
Trait Implementations§
Source§impl Clone for ChannelSendRoutes
impl Clone for ChannelSendRoutes
Source§impl Debug for ChannelSendRoutes
impl Debug for ChannelSendRoutes
Auto Trait Implementations§
impl !RefUnwindSafe for ChannelSendRoutes
impl !UnwindSafe for ChannelSendRoutes
impl Forget for ChannelSendRoutes
impl Freeze for ChannelSendRoutes
impl Move for ChannelSendRoutes
impl Send for ChannelSendRoutes
impl Sync for ChannelSendRoutes
impl Unpin for ChannelSendRoutes
impl UnsafeUnpin for ChannelSendRoutes
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
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more