[][src]Enum koibumi_node::Event

pub enum Event {
    ConnectionCounts {
        incoming_initiated: usize,
        incoming_connected: usize,
        incoming_established: usize,
        outgoing_initiated: usize,
        outgoing_connected: usize,
        outgoing_established: usize,
    },
    AddrCount(usize),
    Established {
        addr: SocketAddrNode,
        user_agent: UserAgent,
        rating: Rating,
    },
    Disconnected {
        addr: SocketAddrNode,
    },
    Objects {
        missing: usize,
        loaded: usize,
        uploaded: usize,
    },
    Stopped,
    Msg {
        user_id: Vec<u8>,
        address: Address,
        object: Object,
    },
    Broadcast {
        user_id: Vec<u8>,
        address: Address,
        object: Object,
    },
}

The events which occur in a Bitmessage node.

Variants

ConnectionCounts

Indicates the stats of the counts of connections have been changed.

Fields of ConnectionCounts

incoming_initiated: usize

The count of incoming initiated connections.

incoming_connected: usize

The count of incoming connected connections.

incoming_established: usize

The count of incoming established connections.

outgoing_initiated: usize

The count of outgoing initiated connections.

outgoing_connected: usize

The count of outgoing connected connections.

outgoing_established: usize

The count of outgoing established connections.

AddrCount(usize)

Indicates the count of known node addresses has been changed.

Established

Indicates a connection to a node has newly been established. The socket address, the user agent and the rating of the connectivity of the node are returned.

Fields of Established

addr: SocketAddrNode

The socket address.

user_agent: UserAgent

The user agent.

rating: Rating

The rating.

Disconnected

Indicates an established connection to a node has been disconnected. The socket address of the node is returned.

Fields of Disconnected

addr: SocketAddrNode

The socket address.

Objects

Indicates the stats of the counts of objects are changed.

Fields of Objects

missing: usize

The count of missing objects.

loaded: usize

The count of loaded objects.

uploaded: usize

The count of uploaded objects.

Stopped

Indicates the node has been stopped.

Msg

Indicates that an user received a msg message.

Fields of Msg

user_id: Vec<u8>

The user ID.

address: Address

The Bitmessage address of the receiver of the msg message.

object: Object

The message object.

Broadcast

Indicates that an user received a broadcast message.

Fields of Broadcast

user_id: Vec<u8>

The user ID.

address: Address

The Bitmessage address of the sender of the broadcast message.

object: Object

The message object.

Trait Implementations

impl Clone for Event[src]

impl Debug for Event[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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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<V, T> VZip<V> for T where
    V: MultiLane<T>,