[][src]Enum nng::Protocol

pub enum Protocol {
    Bus0,
    Pair0,
    Pair1,
    Pub0,
    Pull0,
    Push0,
    Rep0,
    Req0,
    Respondent0,
    Sub0,
    Surveyor0,
}

Describes a relationship between a socket and all sockets to which it is connected.

Variants

Bus0

Version 0 of the bus protocol.

The bus protocol provides for building mesh networks where every peer is connected to every other peer. In this protocol, each message sent by a node is sent to every one of its directly connected peers. See the bus documentation for more information.

Pair0

Version 0 of the pair protocol.

The pair protocol implements a peer-to-peer pattern, where relationships between peers are one-to-one. See the pair documentation for more information.

Pair1

Version 1 of the pair protocol.

The pair protocol implements a peer-to-peer pattern, where relationships between peers are one-to-one. Version 1 of this protocol supports and optional polyamorous mode. See the pair documentation for more information.

Pub0

Version 0 of the publisher protocol.

The pub protocol is one half of a publisher/subscriber pattern. In this pattern, a publisher sends data, which is broadcast to all subscribers. The subscribing applications only see the data to which they have subscribed. See the publisher/subscriber documentation for more information.

Pull0

Version 0 of the pull protocol.

The pull protocol is one half of a pipeline pattern. The other half is the push protocol. In the pipeline pattern, pushers distribute messages to pullers. Each message sent by a pusher will be sent to one of its peer pullers, chosen in a round-robin fashion from the set of connected peers available for receiving. This property makes this pattern useful in load-balancing scenarios.

See the pipeline documentation for more information.

Push0

Version 0 of the push protocol.

The push protocol is one half of a pipeline pattern. The other side is the pull protocol. In the pipeline pattern, pushers distribute messages to pullers. Each message sent by a pusher will be sent to one of its peer pullers, chosen in a round-robin fashion from the set of connected peers available for receiving. This property makes this pattern useful in load-balancing scenarios.

See the pipeline documentation for more information.

Rep0

Version 0 of the reply protocol.

The rep protocol is one half of a request/reply pattern. In this pattern, a requester sends a message to one replier, who is expected to reply. The request is resent if no reply arrives, until a reply is received or the request times out.

See the request/reply documentation for more information.

Req0

Version 0 of the request protocol.

The req protocol is one half of a request/reply pattern. In this pattern, a requester sends a message to one replier, who is expected to reply. The request is resent if no reply arrives, until a reply is received or the request times out.

See the request/reply documentation for more information.

Respondent0

Version 0 of the respondent protocol.

The respondent protocol is one half of a survey pattern. In this pattern, a surveyor sends a survey, which is broadcast to all peer respondents. The respondents then have a chance to reply (but are not obliged to reply). The survey itself is a timed event, so that responses received after the survey has finished are discarded.

See the survery documentation for more information.

Sub0

Version 0 of the subscriber protocol.

The sub protocol is one half of a publisher/subscriber pattern. In this pattern, a publisher sends data, which is broadcast to all subscribers. The subscribing applications only see the data to which they have subscribed.

See the publisher/subscriber documentation for more information.

Surveyor0

Version 0 of the surveyor protocol.

The surveyor protocol is one half of a survey pattern. In this pattern, a surveyor sends a survey, which is broadcast to all peer respondents. The respondents then have a chance to reply (but are not obliged to reply). The survey itself is a timed event, so that responses received after the survey has finished are discarded.

See the survey documentation for more information.

Trait Implementations

impl Eq for Protocol[src]

impl Ord for Protocol[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialEq<Protocol> for Protocol[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for Protocol[src]

impl Clone for Protocol[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialOrd<Protocol> for Protocol[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Debug for Protocol[src]

impl Display for Protocol[src]

impl Hash for Protocol[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Protocol

impl Sync for Protocol

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

impl<T> From<T> for T[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.

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

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

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