pub struct DispatchBuilder { /* private fields */ }Expand description
Builder for constructing a [Dispatch] handler.
See [DispatchBuilder::add] for how to construct dispatched ranges.
Implementations§
Source§impl DispatchBuilder
impl DispatchBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty DispatchBuilder with a no-op range.
Sourcepub fn insert<T: DispatchBuilderEntries>(self, entries: T) -> Self
pub fn insert<T: DispatchBuilderEntries>(self, entries: T) -> Self
Registers entries into this builder.
Sourcepub fn insert_node<T: Into<DispatchNode>>(
self,
range: Range<usize>,
node: T,
) -> Self
pub fn insert_node<T: Into<DispatchNode>>( self, range: Range<usize>, node: T, ) -> Self
A shorthand for DispatchBuilder::insert with a tuple of (range, node).
Sourcepub fn insert_reg<R: Register, T: Into<DispatchNode>>(self, node: T) -> Self
pub fn insert_reg<R: Register, T: Into<DispatchNode>>(self, node: T) -> Self
A shorthand for DispatchBuilder::insert with a tuple of
(RegisterRange, node).
Sourcepub fn build(self) -> OpDispatcher
pub fn build(self) -> OpDispatcher
Consumes the builder and returns the configured [Dispatch].
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DispatchBuilder
impl !UnwindSafe for DispatchBuilder
impl Freeze for DispatchBuilder
impl Send for DispatchBuilder
impl Sync for DispatchBuilder
impl Unpin for DispatchBuilder
impl UnsafeUnpin for DispatchBuilder
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