[−][src]Struct bitcoin_zmq::ZMQSubscriber
Factory object allowing constuction of single stream channels and broadcast channels.
Cloning to receive additional factories does not increase overhead when compared to using the subscribe method.
Methods
impl ZMQSubscriber
[src]
pub fn new(
addr: &str,
capacity: usize
) -> (Self, impl Future<Item = (), Error = SubscriptionError> + Send)
[src]
addr: &str,
capacity: usize
) -> (Self, impl Future<Item = (), Error = SubscriptionError> + Send)
Constructs a new factory paired with a future representing the connection/broker.
pub fn single_stream(
addr: &str,
topic: Topic,
capacity: usize
) -> (Box<dyn Stream<Item = Vec<u8>, Error = ()> + Send>, impl Future<Item = (), Error = SubscriptionError> + Send)
[src]
addr: &str,
topic: Topic,
capacity: usize
) -> (Box<dyn Stream<Item = Vec<u8>, Error = ()> + Send>, impl Future<Item = (), Error = SubscriptionError> + Send)
Construct a single stream filtered by topic.
The stream is paired with a future representing the connection.
pub fn subscribe(
&self,
filter_topic: Topic
) -> impl Stream<Item = Bytes, Error = ()> + Send + Sized
[src]
&self,
filter_topic: Topic
) -> impl Stream<Item = Bytes, Error = ()> + Send + Sized
Subscribe to one-of-many streams filtered by topic.
The stream is paired with a future representing the connection and the broker coordinating the broadcast channel.
The return type is Bytes which prevents unecessary clones while streams are being handled by the broker.
This does not consume the factory.
Trait Implementations
impl Clone for ZMQSubscriber
[src]
fn clone(&self) -> ZMQSubscriber
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Unpin for ZMQSubscriber
impl Send for ZMQSubscriber
impl Sync for ZMQSubscriber
impl !RefUnwindSafe for ZMQSubscriber
impl !UnwindSafe for ZMQSubscriber
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,