pub trait CommunicationLayer: Send + Sync {
    // Required methods
    fn publisher(
        &mut self,
        topic: &str
    ) -> Result<Box<dyn Publisher>, Box<dyn Error + Send + Sync + 'static>>;
    fn subscribe(
        &mut self,
        topic: &str
    ) -> Result<Box<dyn Subscriber>, Box<dyn Error + Send + Sync + 'static>>;
}
Expand description

Abstraction trait for different publisher/subscriber implementations.

Required Methods§

source

fn publisher( &mut self, topic: &str ) -> Result<Box<dyn Publisher>, Box<dyn Error + Send + Sync + 'static>>

Creates a publisher for the given topic.

source

fn subscribe( &mut self, topic: &str ) -> Result<Box<dyn Subscriber>, Box<dyn Error + Send + Sync + 'static>>

Subscribe to the given topic.

Implementors§

source§

impl CommunicationLayer for ZenohCommunicationLayer

Available on crate feature zenoh only.