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