Skip to main content

Skeleton

Trait Skeleton 

Source
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§

Source

fn new(transport: Arc<Self::TransportImpl>, instance_id: InstanceId) -> Self

Source

fn offer<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), AraComError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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§

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.

Implementors§