pub type BoundedMixnodeFor<T> = BoundedMixnode<BoundedVec<BoundedVec<u8, <T as Config>::MaxExternalAddressSize>, <T as Config>::MaxExternalAddressesPerMixnode>>;
Expand description
BoundedMixnode
type for the given configuration.
Aliased Type§
struct BoundedMixnodeFor<T> {
pub kx_public: [u8; 32],
pub peer_id: [u8; 32],
pub external_addresses: BoundedVec<BoundedVec<u8, <T as Config>::MaxExternalAddressSize>, <T as Config>::MaxExternalAddressesPerMixnode>,
}
Fields§
§kx_public: [u8; 32]
Key-exchange public key for the mixnode.
peer_id: [u8; 32]
libp2p peer ID of the mixnode.
external_addresses: BoundedVec<BoundedVec<u8, <T as Config>::MaxExternalAddressSize>, <T as Config>::MaxExternalAddressesPerMixnode>
External addresses for the mixnode, in multiaddr format, UTF-8 encoded.
Trait Implementations
Source§impl<ExternalAddresses: Clone> Clone for BoundedMixnode<ExternalAddresses>
impl<ExternalAddresses: Clone> Clone for BoundedMixnode<ExternalAddresses>
Source§fn clone(&self) -> BoundedMixnode<ExternalAddresses>
fn clone(&self) -> BoundedMixnode<ExternalAddresses>
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<ExternalAddresses> Debug for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: Debug,
impl<ExternalAddresses> Debug for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: Debug,
Source§impl<ExternalAddresses> Decode for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: Decode,
impl<ExternalAddresses> Decode for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: Decode,
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<'de, ExternalAddresses> Deserialize<'de> for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: Deserialize<'de>,
impl<'de, ExternalAddresses> Deserialize<'de> for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: Deserialize<'de>,
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<ExternalAddresses> Encode for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: Encode,
impl<ExternalAddresses> Encode for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: Encode,
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<MaxExternalAddressSize: Get<u32>, MaxExternalAddresses: Get<u32>> From<Mixnode> for BoundedMixnode<BoundedVec<BoundedVec<u8, MaxExternalAddressSize>, MaxExternalAddresses>>
impl<MaxExternalAddressSize: Get<u32>, MaxExternalAddresses: Get<u32>> From<Mixnode> for BoundedMixnode<BoundedVec<BoundedVec<u8, MaxExternalAddressSize>, MaxExternalAddresses>>
Source§impl<MaxExternalAddressSize, MaxExternalAddresses> Into<Mixnode> for BoundedMixnode<BoundedVec<BoundedVec<u8, MaxExternalAddressSize>, MaxExternalAddresses>>
impl<MaxExternalAddressSize, MaxExternalAddresses> Into<Mixnode> for BoundedMixnode<BoundedVec<BoundedVec<u8, MaxExternalAddressSize>, MaxExternalAddresses>>
Source§impl<ExternalAddresses> MaxEncodedLen for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: MaxEncodedLen,
impl<ExternalAddresses> MaxEncodedLen for BoundedMixnode<ExternalAddresses>where
ExternalAddresses: MaxEncodedLen,
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl<ExternalAddresses: PartialEq> PartialEq for BoundedMixnode<ExternalAddresses>
impl<ExternalAddresses: PartialEq> PartialEq for BoundedMixnode<ExternalAddresses>
Source§fn eq(&self, other: &BoundedMixnode<ExternalAddresses>) -> bool
fn eq(&self, other: &BoundedMixnode<ExternalAddresses>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.