Enum nng::options::protocol::pubsub::Subscribe[][src]

pub enum Subscribe {}

Register a topic that the subscriber is interested in.

This option takes an array of bytes, of arbitrary size. Each incoming message is checked against the list of subscribed topics. If the body begins with the entire set of bytes in the topic, then the message is accepted. If no topic matches, then the message is discarded.

To receive all messages, an empty topic (zero length) can be used. To receive any messages, at least one subscription must exist.

Support

  • Sockets can set this option when using the Sub v0 protocol.

Trait Implementations

impl Clone for Subscribe[src]

impl Copy for Subscribe[src]

impl Debug for Subscribe[src]

impl Display for Subscribe[src]

impl Eq for Subscribe[src]

impl Hash for Subscribe[src]

impl Opt for Subscribe[src]

type OptType = Vec<u8>

The type that the option read and writes.

impl Ord for Subscribe[src]

impl PartialEq<Subscribe> for Subscribe[src]

impl PartialOrd<Subscribe> for Subscribe[src]

impl SetOpt<Subscribe> for Socket[src]

impl StructuralEq for Subscribe[src]

impl StructuralPartialEq for Subscribe[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.