pub enum StreamType {
Req(Peer),
Res(bool),
Ok(TransportStream),
}Expand description
Type: P2P stream type. Custom apply for build a stream between nodes.
Variants§
Req(Peer)
request for build a stream, params is peer id, transport type and request custom info.
Res(bool)
response for build a stream, params is is_ok, and response custom info.
Ok(TransportStream)
if response is ok, will build a stream, and return the stream to ouside.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamType
impl !RefUnwindSafe for StreamType
impl Send for StreamType
impl Sync for StreamType
impl Unpin for StreamType
impl !UnwindSafe for StreamType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more