Enum tdn::prelude::RecvType[][src]

pub enum RecvType {
    Connect(PeerVec<u8, Global>),
    Result(PeerboolVec<u8, Global>),
    ResultConnect(PeerVec<u8, Global>),
    Leave(PeerId),
    Event(PeerIdVec<u8, Global>),
    Stream(u32, StreamType, Vec<u8, Global>),
    Delivery(DeliveryTypeu64bool),
}
Expand description

channel message receive from TDN Group.

Variants

Connect(PeerVec<u8, Global>)

Tuple Fields

0: Peer
1: Vec<u8, Global>

when peer what a stable connection, send from TDN to outside. params: peer, and peer connect_info.

Result(PeerboolVec<u8, Global>)

Tuple Fields

0: Peer
1: bool
2: Vec<u8, Global>

when peer a stable connect result. params: peer, is_ok and result_data.

ResultConnect(PeerVec<u8, Global>)

Tuple Fields

0: Peer
1: Vec<u8, Global>

when peer agree a connect, but network is closed, create a result connect to it.

Leave(PeerId)

Tuple Fields

0: PeerId

when a stable connected peer leave, send from TDN to outside. params: peer_id.

Event(PeerIdVec<u8, Global>)

Tuple Fields

0: PeerId
1: Vec<u8, Global>

when received a data from a trusted peer, send to outside. params: peer_id and data_bytes.

Stream(u32, StreamType, Vec<u8, Global>)

Tuple Fields

0: u32
1: StreamType
2: Vec<u8, Global>

Apply for build a stream between nodes. params: u32 stream symbol, and StreamType.

Delivery(DeliveryTypeu64bool)

Tuple Fields

1: u64
2: bool

Message sended delivery feedback. type has Event, StableConnect, StableResult. params: delivery_type, delivery_id, is_sended.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more