Trait Server

Source
pub trait Server<T: ServerTypes> {
    // Required method
    fn prepare(&self, service: ServiceDefinition) -> T::LocalServiceFut;
}
Expand description

Services can be included in other services, and are included in the database when they are published. All included services should be prepared before the service including them. Publishing a service that includes other services will publish the included services, although the events associated with the included service will not be returned until the LocalService::publish is called.

Required Methods§

Source

fn prepare(&self, service: ServiceDefinition) -> T::LocalServiceFut

Prepare to publish a service. This service is not immediately visible in the local GATT server. It will be published when the LocalService::publish is called. If the returned LocalService is dropped, the service will be removed from the Server.

Implementors§