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§
fn glue_new_sub(receive_address: String) -> Result<impl GlueSubscriber>
fn glue_recv<T>(&self) -> Result<T, Box<dyn Error>>
fn glue_gen_recv<T>(self) -> impl FnMut() -> Result<T, Box<dyn Error>>
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
impl GlueSubscriber for Socket
Source§fn glue_new_sub(receive_address: String) -> Result<impl GlueSubscriber>
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>>
fn glue_recv<T>(&self) -> Result<T, Box<dyn Error>>
§A more convenient wrapper for receive_serialized().
Receives an arbitrary msg that implements TryFromzmq::Message from designated publisher socket.
Requires type annotation.