ServiceProvider

Trait ServiceProvider 

Source
pub trait ServiceProvider {
    // Required methods
    fn descriptor(&self) -> ProductDescriptor;
    fn service(
        &mut self,
        path: &str,
        products: Vec<Product>,
    ) -> (Result<Value, Vec<ServiceError>>, Vec<ServiceNotice>);
}
Expand description

A function for a service.

Required Methods§

Source

fn descriptor(&self) -> ProductDescriptor

Returns a ProductDescriptor for the product this provider provides.

Source

fn service( &mut self, path: &str, products: Vec<Product>, ) -> (Result<Value, Vec<ServiceError>>, Vec<ServiceNotice>)

The function that actually runs the service.

Implementors§