pub struct ServiceBuilder;Expand description
Service component builder and assembler
Entity responsible for converting a Parsec service configuration into a fully formed service.
Each component is independently created after which its ownership can be passed to the previous
component in the ownership chain. The service’s ownership is then passed in the form of
ownership of a FrontEndHandler instance.
Implementations§
Source§impl ServiceBuilder
impl ServiceBuilder
Sourcepub fn build_service(config: &ServiceConfig) -> Result<FrontEndHandler>
pub fn build_service(config: &ServiceConfig) -> Result<FrontEndHandler>
Evaluate the provided configuration and assemble a service based on it. If the configuration contains
any errors or inconsistencies, an Err is returned.
§Errors
- if any of the fields specified in the configuration are inconsistent (e.g. key info manager with name ‘X’
requested for a certain provider does not exist) or if required fields are missing, an error of kind
InvalidDatais returned with a string describing the cause more accurately.
Sourcepub fn start_listener(config: ListenerConfig) -> Result<Box<dyn Listen>>
pub fn start_listener(config: ListenerConfig) -> Result<Box<dyn Listen>>
Construct the service IPC front component and return ownership to it.
Sourcepub fn build_threadpool(num_threads: Option<usize>) -> ThreadPool
pub fn build_threadpool(num_threads: Option<usize>) -> ThreadPool
Construct the thread pool that will be used to process all service requests.
Trait Implementations§
Source§impl Clone for ServiceBuilder
impl Clone for ServiceBuilder
Source§fn clone(&self) -> ServiceBuilder
fn clone(&self) -> ServiceBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceBuilder
impl Debug for ServiceBuilder
impl Copy for ServiceBuilder
Auto Trait Implementations§
impl Freeze for ServiceBuilder
impl RefUnwindSafe for ServiceBuilder
impl Send for ServiceBuilder
impl Sync for ServiceBuilder
impl Unpin for ServiceBuilder
impl UnwindSafe for ServiceBuilder
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