pub struct DispatcherBuilder { /* private fields */ }Expand description
Builder for creating a KernelDispatcher.
Implementations§
Source§impl DispatcherBuilder
impl DispatcherBuilder
Sourcepub fn route<M: PersistentMessage>(self, kernel_id: KernelId) -> Self
pub fn route<M: PersistentMessage>(self, kernel_id: KernelId) -> Self
Add a route for a PersistentMessage type.
Sourcepub fn route_named<M: PersistentMessage>(
self,
kernel_id: KernelId,
handler_name: &str,
) -> Self
pub fn route_named<M: PersistentMessage>( self, kernel_id: KernelId, handler_name: &str, ) -> Self
Add a route with custom handler name.
Sourcepub fn route_raw(self, type_id: u64, kernel_id: KernelId) -> Self
pub fn route_raw(self, type_id: u64, kernel_id: KernelId) -> Self
Add a raw route (for dynamic type_ids).
Sourcepub fn with_config(self, config: DispatcherConfig) -> Self
pub fn with_config(self, config: DispatcherConfig) -> Self
Set dispatcher configuration.
Sourcepub fn with_k2k_config(self, config: K2KConfig) -> Self
pub fn with_k2k_config(self, config: K2KConfig) -> Self
Set K2K configuration.
Sourcepub fn with_logging(self) -> Self
pub fn with_logging(self) -> Self
Enable logging.
Sourcepub fn with_priority(self, priority: u8) -> Self
pub fn with_priority(self, priority: u8) -> Self
Set default message priority.
Sourcepub fn build(self) -> KernelDispatcher
pub fn build(self) -> KernelDispatcher
Build the dispatcher with a new K2K broker.
Sourcepub fn build_with_broker(self, broker: Arc<K2KBroker>) -> KernelDispatcher
pub fn build_with_broker(self, broker: Arc<K2KBroker>) -> KernelDispatcher
Build the dispatcher with an existing K2K broker.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DispatcherBuilder
impl RefUnwindSafe for DispatcherBuilder
impl Send for DispatcherBuilder
impl Sync for DispatcherBuilder
impl Unpin for DispatcherBuilder
impl UnwindSafe for DispatcherBuilder
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.