Struct network_clique::mock::MockPublicKey
source · pub struct MockPublicKey([u8; 4]);
Expand description
A mock public key for verifying signatures.
Tuple Fields§
§0: [u8; 4]
Trait Implementations§
source§impl AsRef<[u8]> for MockPublicKey
impl AsRef<[u8]> for MockPublicKey
source§impl Clone for MockPublicKey
impl Clone for MockPublicKey
source§fn clone(&self) -> MockPublicKey
fn clone(&self) -> MockPublicKey
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 MockPublicKey
impl Debug for MockPublicKey
source§impl Decode for MockPublicKey
impl Decode for MockPublicKey
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 Display for MockPublicKey
impl Display for MockPublicKey
source§impl Encode for MockPublicKey
impl Encode for MockPublicKey
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.
source§fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>(
&self,
f: __CodecUsingEncodedCallback
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>( &self, f: __CodecUsingEncodedCallback ) -> __CodecOutputReturn
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 Hash for MockPublicKey
impl Hash for MockPublicKey
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 Ord for MockPublicKey
impl Ord for MockPublicKey
source§fn cmp(&self, other: &MockPublicKey) -> Ordering
fn cmp(&self, other: &MockPublicKey) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MockPublicKey
impl PartialEq for MockPublicKey
source§fn eq(&self, other: &MockPublicKey) -> bool
fn eq(&self, other: &MockPublicKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MockPublicKey
impl PartialOrd for MockPublicKey
source§fn partial_cmp(&self, other: &MockPublicKey) -> Option<Ordering>
fn partial_cmp(&self, other: &MockPublicKey) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PeerId for MockPublicKey
impl PeerId for MockPublicKey
source§fn to_short_string(&self) -> String
fn to_short_string(&self) -> String
This function is used for logging. It implements a shorter version of
to_string
for ids implementing display.source§impl PublicKey for MockPublicKey
impl PublicKey for MockPublicKey
impl EncodeLike for MockPublicKey
impl Eq for MockPublicKey
impl StructuralPartialEq for MockPublicKey
Auto Trait Implementations§
impl RefUnwindSafe for MockPublicKey
impl Send for MockPublicKey
impl Sync for MockPublicKey
impl Unpin for MockPublicKey
impl UnwindSafe for MockPublicKey
Blanket Implementations§
§impl<T, U> AsByteSlice<T> for U
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8] ⓘ
§impl<U> AsSliceOf for U
impl<U> AsSliceOf for U
fn as_slice_of<T>(&self) -> Result<&[T], Error>where
T: FromByteSlice,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.