Enum hyparview::Action [] [src]

pub enum Action<T> {
    Send {
        destination: T,
        message: Message<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 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

The ID of the destination node of the message.

An outgoing message.

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

The ID of the target node.

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

An event emitted by a HyParView Node.

Trait Implementations

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

[src]

Formats the value using the given formatter. Read more

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

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T: Eq> Eq 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