Enum ethcore_network::NetworkIoMessage
source · [−]pub enum NetworkIoMessage {
AddHandler {
handler: Arc<dyn NetworkProtocolHandler + Sync>,
protocol: ProtocolId,
versions: Vec<(u8, u8)>,
},
AddTimer {
protocol: ProtocolId,
token: TimerToken,
delay: Duration,
},
InitPublicInterface,
Disconnect(PeerId),
DisablePeer(PeerId),
NetworkStarted(String),
}
Expand description
Messages used to communitate with the event loop from other threads.
Variants
AddHandler
Fields
handler: Arc<dyn NetworkProtocolHandler + Sync>
Handler shared instance.
protocol: ProtocolId
Protocol Id.
Register a new protocol handler.
AddTimer
Register a new protocol timer
InitPublicInterface
Initliaze public interface.
Disconnect(PeerId)
Disconnect a peer.
DisablePeer(PeerId)
Disconnect and temporary disable peer.
NetworkStarted(String)
Network has been started with the host as the given enode.
Trait Implementations
sourceimpl Clone for NetworkIoMessage
impl Clone for NetworkIoMessage
sourcefn clone(&self) -> NetworkIoMessage
fn clone(&self) -> NetworkIoMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for NetworkIoMessage
impl Send for NetworkIoMessage
impl Sync for NetworkIoMessage
impl Unpin for NetworkIoMessage
impl !UnwindSafe for NetworkIoMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more