Struct ockam_node::ProcessorBuilder
source · pub struct ProcessorBuilder<P> { /* private fields */ }Expand description
Start a Processor with a custom IncomingAccessControl and OutgoingAccessControl configuration
Any incoming messages for the processor will first be subject to the
configured AccessControl before it is passed on to
Processor::process.
The Context::start_processor() function wraps this type and
simply calls ProcessorBuilder::with_inherited_access_control().
Varying use-cases should use the builder API to customise the underlying processor that is created.
Implementations§
source§impl<P> ProcessorBuilder<P>where
P: Processor<Context = Context>,
impl<P> ProcessorBuilder<P>where P: Processor<Context = Context>,
sourcepub fn with_access_control<AC>(
incoming_access_control: Arc<dyn IncomingAccessControl>,
outgoing_access_control: Arc<dyn OutgoingAccessControl>,
address: impl Into<Address>,
processor: P
) -> Self
pub fn with_access_control<AC>( incoming_access_control: Arc<dyn IncomingAccessControl>, outgoing_access_control: Arc<dyn OutgoingAccessControl>, address: impl Into<Address>, processor: P ) -> Self
Create a processor which uses the given access control
sourcepub fn with_mailboxes(mailboxes: Mailboxes, processor: P) -> Self
pub fn with_mailboxes(mailboxes: Mailboxes, processor: P) -> Self
Create a processor which uses the access control from the given
Mailboxes
Auto Trait Implementations§
impl<P> !RefUnwindSafe for ProcessorBuilder<P>
impl<P> Send for ProcessorBuilder<P>where P: Send,
impl<P> Sync for ProcessorBuilder<P>where P: Sync,
impl<P> Unpin for ProcessorBuilder<P>where P: Unpin,
impl<P> !UnwindSafe for ProcessorBuilder<P>
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