pub trait Skeleton: Send + Sync {
type ServiceDef: ServiceDefinition;
type TransportImpl: Transport;
// Required methods
fn new(transport: Arc<Self::TransportImpl>, instance_id: InstanceId) -> Self;
fn offer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AraComError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop_offer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AraComError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn service_id() -> ServiceId { ... }
}Expand description
Trait that generated skeleton structs implement.
Generated skeletons must also expose offer / stop_offer and carry a
reference to their service definition for type-checked version constants.
Required Associated Types§
Required Methods§
fn new(transport: Arc<Self::TransportImpl>, instance_id: InstanceId) -> Self
fn offer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AraComError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_offer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AraComError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn service_id() -> ServiceId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.