Trait splinter::service::ServiceFactory
source · [−]pub trait ServiceFactory: Send {
fn available_service_types(&self) -> &[String];
fn create(
&self,
service_id: String,
service_type: &str,
circuit_id: &str,
args: HashMap<String, String>
) -> Result<Box<dyn Service>, FactoryCreateError>;
fn get_rest_endpoints(&self) -> Vec<ServiceEndpoint>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
}
Expand description
A ServiceFactory
creates services.
Required Methods
fn available_service_types(&self) -> &[String]
fn available_service_types(&self) -> &[String]
Return the available service types that this factory can create.
Create a Service instance with the given ID, of the given type, the given circuit_id, with the given arguments.
fn get_rest_endpoints(&self) -> Vec<ServiceEndpoint>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn get_rest_endpoints(&self) -> Vec<ServiceEndpoint>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Get the ServiceEndpoint
definitions that represent the REST API resources provided by
the services that this factory can create.