referrerpolicy=no-referrer-when-downgrade
pallet_mixnet

Type Alias BoundedMixnodeFor

Source
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>

Source§

fn clone(&self) -> BoundedMixnode<ExternalAddresses>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<ExternalAddresses> Debug for BoundedMixnode<ExternalAddresses>
where ExternalAddresses: Debug,

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<ExternalAddresses> Decode for BoundedMixnode<ExternalAddresses>
where ExternalAddresses: Decode,

Source§

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,

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,

Attempt to skip the encoded value from input. Read more
§

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>,

Source§

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,

Source§

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, )

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

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>>

Source§

fn from(mixnode: Mixnode) -> Self

Converts to this type from the input type.
Source§

impl<MaxExternalAddressSize, MaxExternalAddresses> Into<Mixnode> for BoundedMixnode<BoundedVec<BoundedVec<u8, MaxExternalAddressSize>, MaxExternalAddresses>>

Source§

fn into(self) -> Mixnode

Converts this type into the (usually inferred) input type.
Source§

impl<ExternalAddresses> MaxEncodedLen for BoundedMixnode<ExternalAddresses>
where ExternalAddresses: MaxEncodedLen,

Source§

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>

Source§

fn eq(&self, other: &BoundedMixnode<ExternalAddresses>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<ExternalAddresses> Serialize for BoundedMixnode<ExternalAddresses>
where ExternalAddresses: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<ExternalAddresses> TypeInfo for BoundedMixnode<ExternalAddresses>
where ExternalAddresses: TypeInfo + 'static,

Source§

type Identity = BoundedMixnode<ExternalAddresses>

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl<ExternalAddresses> DecodeWithMemTracking for BoundedMixnode<ExternalAddresses>
where ExternalAddresses: DecodeWithMemTracking,

Source§

impl<ExternalAddresses> EncodeLike for BoundedMixnode<ExternalAddresses>
where ExternalAddresses: Encode,

Source§

impl<ExternalAddresses> StructuralPartialEq for BoundedMixnode<ExternalAddresses>