Enum tdn::prelude::RecvType [−][src]
pub enum RecvType {
Connect(Peer, Vec<u8, Global>),
Result(Peer, bool, Vec<u8, Global>),
ResultConnect(Peer, Vec<u8, Global>),
Leave(PeerId),
Event(PeerId, Vec<u8, Global>),
Stream(u32, StreamType, Vec<u8, Global>),
Delivery(DeliveryType, u64, bool),
}
Expand description
channel message receive from TDN Group.
Variants
Connect(Peer, Vec<u8, Global>)
when peer what a stable connection, send from TDN to outside.
params: peer
, and peer connect_info
.
Result(Peer, bool, Vec<u8, Global>)
when peer a stable connect result.
params: peer
, is_ok
and result_data
.
ResultConnect(Peer, 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(PeerId, 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>)
Apply for build a stream between nodes.
params: u32
stream symbol, and StreamType
.
Delivery(DeliveryType, u64, bool)
Message sended delivery feedback. type has Event, StableConnect, StableResult.
params: delivery_type
, delivery_id
, is_sended
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RecvType
impl !UnwindSafe for RecvType
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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