[][src]Enum hyparview::Action

pub enum Action<T> {
    Send {
        destination: T,
        message: ProtocolMessage<T>,
    },
    Disconnect {
        node: T,
    },
    Notify {
        event: Event<T>,
    },
}

Actions instructed by HyParView Node.

For running HyParView nodes, the users must handle the actions correctly.

Variants

Send

Send a message.

If there is no existing connection between the sender and the destination, new connection should be established automatically.

If the destination node does not exist, the message will be discarded silently.

Although it is not recommended, it is acceptable for discarding some messages if the load of networks (or systems) are too high.

Fields of Send

destination: T

The ID of the destination node of the message.

message: ProtocolMessage<T>

An outgoing message.

Disconnect

Close a connection.

The connection between the local node and node must be disconnected. If there is no such connection, this action will be silently ignored.

Fields of Disconnect

node: T

The ID of the target node.

Notify

Notify an event.

If there are some listeners that monitoring HyPerView events, the events emitted by nodes should be notified to them.

Fields of Notify

event: Event<T>

An event emitted by a HyParView Node.

Trait Implementations

impl<T: Eq> Eq for Action<T>[src]

impl<T: PartialEq> PartialEq<Action<T>> for Action<T>[src]

impl<T: Debug> Debug for Action<T>[src]

Auto Trait Implementations

impl<T> Send for Action<T> where
    T: Send

impl<T> Sync for Action<T> where
    T: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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

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