pub enum NetworkMessage {
Error(ErrorCode),
RpcRequest(RpcRequest),
RpcResponse(RpcResponse),
DirectSendMsg(DirectSendMsg),
}
Expand description
Most primitive message type set on the network.
Variants§
Trait Implementations§
source§impl Arbitrary for NetworkMessage
impl Arbitrary for NetworkMessage
§type Parameters = (<ErrorCode as Arbitrary>::Parameters, <RpcRequest as Arbitrary>::Parameters, <RpcResponse as Arbitrary>::Parameters, <DirectSendMsg as Arbitrary>::Parameters)
type Parameters = (<ErrorCode as Arbitrary>::Parameters, <RpcRequest as Arbitrary>::Parameters, <RpcResponse as Arbitrary>::Parameters, <DirectSendMsg as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = TupleUnion<((u32, Arc<Map<<ErrorCode as Arbitrary>::Strategy, fn(_: ErrorCode) -> NetworkMessage>>), (u32, Arc<Map<<RpcRequest as Arbitrary>::Strategy, fn(_: RpcRequest) -> NetworkMessage>>), (u32, Arc<Map<<RpcResponse as Arbitrary>::Strategy, fn(_: RpcResponse) -> NetworkMessage>>), (u32, Arc<Map<<DirectSendMsg as Arbitrary>::Strategy, fn(_: DirectSendMsg) -> NetworkMessage>>))>
type Strategy = TupleUnion<((u32, Arc<Map<<ErrorCode as Arbitrary>::Strategy, fn(_: ErrorCode) -> NetworkMessage>>), (u32, Arc<Map<<RpcRequest as Arbitrary>::Strategy, fn(_: RpcRequest) -> NetworkMessage>>), (u32, Arc<Map<<RpcResponse as Arbitrary>::Strategy, fn(_: RpcResponse) -> NetworkMessage>>), (u32, Arc<Map<<DirectSendMsg as Arbitrary>::Strategy, fn(_: DirectSendMsg) -> NetworkMessage>>))>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for NetworkMessage
impl Clone for NetworkMessage
source§fn clone(&self) -> NetworkMessage
fn clone(&self) -> NetworkMessage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NetworkMessage
impl Debug for NetworkMessage
source§impl<'de> Deserialize<'de> for NetworkMessage
impl<'de> Deserialize<'de> for NetworkMessage
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 PartialEq<NetworkMessage> for NetworkMessage
impl PartialEq<NetworkMessage> for NetworkMessage
source§fn eq(&self, other: &NetworkMessage) -> bool
fn eq(&self, other: &NetworkMessage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for NetworkMessage
impl Serialize for NetworkMessage
source§impl<TWriteSocket: AsyncWrite> Sink<&NetworkMessage> for NetworkMessageSink<TWriteSocket>
impl<TWriteSocket: AsyncWrite> Sink<&NetworkMessage> for NetworkMessageSink<TWriteSocket>
§type Error = WriteError
type Error = WriteError
The type of value produced by the sink when an error occurs.
source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(
self: Pin<&mut Self>,
message: &NetworkMessage
) -> Result<(), Self::Error>
fn start_send( self: Pin<&mut Self>, message: &NetworkMessage ) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreimpl Eq for NetworkMessage
impl StructuralEq for NetworkMessage
impl StructuralPartialEq for NetworkMessage
Auto Trait Implementations§
impl RefUnwindSafe for NetworkMessage
impl Send for NetworkMessage
impl Sync for NetworkMessage
impl Unpin for NetworkMessage
impl UnwindSafe for NetworkMessage
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PersistableConfig for Twhere
T: Serialize + DeserializeOwned + ?Sized,
impl<T> PersistableConfig for Twhere T: Serialize + DeserializeOwned + ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.