Struct network_clique::mock::MockAddressingInformation
source · pub struct MockAddressingInformation {
peer_id: MockPublicKey,
address: String,
valid: bool,
}
Fields§
§peer_id: MockPublicKey
§address: String
§valid: bool
Trait Implementations§
source§impl Clone for MockAddressingInformation
impl Clone for MockAddressingInformation
source§fn clone(&self) -> MockAddressingInformation
fn clone(&self) -> MockAddressingInformation
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 MockAddressingInformation
impl Debug for MockAddressingInformation
source§impl Decode for MockAddressingInformation
impl Decode for MockAddressingInformation
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
source§impl Encode for MockAddressingInformation
impl Encode for MockAddressingInformation
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<MockAddressingInformation> for Vec<MockAddressingInformation>
impl From<MockAddressingInformation> for Vec<MockAddressingInformation>
source§fn from(address: MockAddressingInformation) -> Self
fn from(address: MockAddressingInformation) -> Self
Converts to this type from the input type.
source§impl Hash for MockAddressingInformation
impl Hash for MockAddressingInformation
source§impl<D: Data> Network<MockPublicKey, MockAddressingInformation, D> for MockNetwork<D>
impl<D: Data> Network<MockPublicKey, MockAddressingInformation, D> for MockNetwork<D>
source§fn add_connection(
&mut self,
peer: MockPublicKey,
address: MockAddressingInformation
)
fn add_connection( &mut self, peer: MockPublicKey, address: MockAddressingInformation )
Add the peer to the set of connected peers.
source§fn remove_connection(&mut self, peer: MockPublicKey)
fn remove_connection(&mut self, peer: MockPublicKey)
Remove the peer from the set of connected peers and close the connection.
source§fn send(&self, data: D, recipient: MockPublicKey)
fn send(&self, data: D, recipient: MockPublicKey)
Send a message to a single peer.
This function should be implemented in a non-blocking manner.
source§impl NetworkIdentity for MockAddressingInformation
impl NetworkIdentity for MockAddressingInformation
type PeerId = MockPublicKey
type AddressingInformation = MockAddressingInformation
source§fn identity(&self) -> Self::AddressingInformation
fn identity(&self) -> Self::AddressingInformation
The external identity of this node.
source§impl PartialEq for MockAddressingInformation
impl PartialEq for MockAddressingInformation
source§fn eq(&self, other: &MockAddressingInformation) -> bool
fn eq(&self, other: &MockAddressingInformation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl EncodeLike for MockAddressingInformation
impl Eq for MockAddressingInformation
impl StructuralPartialEq for MockAddressingInformation
Auto Trait Implementations§
impl RefUnwindSafe for MockAddressingInformation
impl Send for MockAddressingInformation
impl Sync for MockAddressingInformation
impl Unpin for MockAddressingInformation
impl UnwindSafe for MockAddressingInformation
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
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>
fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>
Return an encoding of
Self
prepended by given slice.