pub struct DispatcherBuilder { /* private fields */ }Expand description
Builder for creating a KernelDispatcher.
Implementations§
Source§impl DispatcherBuilder
impl DispatcherBuilder
Sourcepub fn new() -> DispatcherBuilder
pub fn new() -> DispatcherBuilder
Create a new builder.
Sourcepub fn route<M>(self, kernel_id: KernelId) -> DispatcherBuilderwhere
M: PersistentMessage,
pub fn route<M>(self, kernel_id: KernelId) -> DispatcherBuilderwhere
M: PersistentMessage,
Add a route for a PersistentMessage type.
Sourcepub fn route_named<M>(
self,
kernel_id: KernelId,
handler_name: &str,
) -> DispatcherBuilderwhere
M: PersistentMessage,
pub fn route_named<M>(
self,
kernel_id: KernelId,
handler_name: &str,
) -> DispatcherBuilderwhere
M: PersistentMessage,
Add a route with custom handler name.
Sourcepub fn route_raw(self, type_id: u64, kernel_id: KernelId) -> DispatcherBuilder
pub fn route_raw(self, type_id: u64, kernel_id: KernelId) -> DispatcherBuilder
Add a raw route (for dynamic type_ids).
Sourcepub fn with_config(self, config: DispatcherConfig) -> DispatcherBuilder
pub fn with_config(self, config: DispatcherConfig) -> DispatcherBuilder
Set dispatcher configuration.
Sourcepub fn with_k2k_config(self, config: K2KConfig) -> DispatcherBuilder
pub fn with_k2k_config(self, config: K2KConfig) -> DispatcherBuilder
Set K2K configuration.
Sourcepub fn with_logging(self) -> DispatcherBuilder
pub fn with_logging(self) -> DispatcherBuilder
Enable logging.
Sourcepub fn with_priority(self, priority: u8) -> DispatcherBuilder
pub fn with_priority(self, priority: u8) -> DispatcherBuilder
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§
Source§impl Default for DispatcherBuilder
impl Default for DispatcherBuilder
Source§fn default() -> DispatcherBuilder
fn default() -> DispatcherBuilder
Returns the “default value” for a type. Read more
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.