Trait CommunicationLayer

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