GlueSubscriber

Trait GlueSubscriber 

Source
pub trait GlueSubscriber: Send {
    // Required methods
    fn glue_new_sub(receive_address: String) -> Result<impl GlueSubscriber>;
    fn glue_recv<T>(&self) -> Result<T, Box<dyn Error>>
       where T: TryFrom<Message> + Send + Sync + 'static,
             T::Error: Error + 'static;
    fn glue_gen_recv<T>(self) -> impl FnMut() -> Result<T, Box<dyn Error>>
       where T: TryFrom<Message> + Send + Sync + 'static,
             T::Error: Error + 'static;
}

Required Methods§

Source

fn glue_new_sub(receive_address: String) -> Result<impl GlueSubscriber>

Source

fn glue_recv<T>(&self) -> Result<T, Box<dyn Error>>
where T: TryFrom<Message> + Send + Sync + 'static, T::Error: Error + 'static,

Source

fn glue_gen_recv<T>(self) -> impl FnMut() -> Result<T, Box<dyn Error>>
where T: TryFrom<Message> + Send + Sync + 'static, T::Error: Error + 'static,

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.

Implementations on Foreign Types§

Source§

impl GlueSubscriber for Socket

Source§

fn glue_new_sub(receive_address: String) -> Result<impl GlueSubscriber>

Opens a new subscriber port for receiving messages connected to receive_address given a context.

Source§

fn glue_recv<T>(&self) -> Result<T, Box<dyn Error>>
where T: TryFrom<Message> + Send + Sync + 'static, T::Error: Error + 'static,

§A more convenient wrapper for receive_serialized().

Receives an arbitrary msg that implements TryFromzmq::Message from designated publisher socket. Requires type annotation.

Source§

fn glue_gen_recv<T>(self) -> impl FnMut() -> Result<T, Box<dyn Error>>
where T: TryFrom<Message> + Send + Sync + 'static, T::Error: Error + 'static,

Implementors§