pub enum Command {
Broadcast(Bytes),
BroadcastNeighbors(Bytes),
JoinPeers(Vec<NodeId>),
}
Available on crate feature
net
only.Expand description
Send a gossip message
Variants§
Broadcast(Bytes)
Broadcast a message to all nodes in the swarm
BroadcastNeighbors(Bytes)
Broadcast a message to all direct neighbors
JoinPeers(Vec<NodeId>)
Connect to a set of peers
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Command> for Request
Available on crate feature rpc
only.
impl From<Command> for Request
Available on crate feature
rpc
only.Source§fn from(value: SubscribeUpdate) -> Self
fn from(value: SubscribeUpdate) -> Self
Converts to this type from the input type.
Source§impl<'a> TryFrom<&'a Request> for &'a SubscribeUpdate
Available on crate feature rpc
only.
impl<'a> TryFrom<&'a Request> for &'a SubscribeUpdate
Available on crate feature
rpc
only.Auto Trait Implementations§
impl !Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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