Enum pallet_node_authorization::pallet::Call [−][src]
pub enum Call<T: Config> { add_well_known_node(PeerId, T::AccountId), remove_well_known_node(PeerId), swap_well_known_node(PeerId, PeerId), reset_well_known_nodes(Vec<(PeerId, T::AccountId)>), claim_node(PeerId), remove_claim(PeerId), transfer_node(PeerId, T::AccountId), add_connections(PeerId, Vec<PeerId>), remove_connections(PeerId, Vec<PeerId>), // some variants omitted }
Expand description
Contains one variant per dispatchable that can be called by an extrinsic.
Variants
Add a node to the set of well known nodes. If the node is already claimed, the owner will be updated and keep the existing additional connection unchanged.
May only be called from T::AddOrigin
.
node
: identifier of the node.
remove_well_known_node(PeerId)
Remove a node from the set of well known nodes. The ownership and additional connections of the node will also be removed.
May only be called from T::RemoveOrigin
.
node
: identifier of the node.
Swap a well known node to another. Both the ownership and additional connections stay untouched.
May only be called from T::SwapOrigin
.
remove
: the node which will be moved out from the list.add
: the node which will be put in the list.
Reset all the well known nodes. This will not remove the ownership and additional connections for the removed nodes. The node owner can perform further cleaning if they decide to leave the network.
May only be called from T::ResetOrigin
.
nodes
: the new nodes for the allow list.
claim_node(PeerId)
A given node can be claimed by anyone. The owner should be the first to know its PeerId, so claim it right away!
node
: identifier of the node.
remove_claim(PeerId)
A claim can be removed by its owner and get back the reservation. The additional connections are also removed. You can’t remove a claim on well known nodes, as it needs to reach consensus among the network participants.
node
: identifier of the node.
A node can be transferred to a new owner.
node
: identifier of the node.owner
: new owner of the node.
Add additional connections to a given node.
node
: identifier of the node.connections
: additonal nodes from which the connections are allowed.
Remove additional connections of a given node.
node
: identifier of the node.connections
: additonal nodes from which the connections are not allowed anymore.
Trait Implementations
Attempt to deserialise the value from 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
Convert self to a slice and append it to the destination.
fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
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
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Return the function name of the Call.
Return all function names.
Return a DispatchInfo
, containing relevant information of this dispatch. Read more
Dispatch this call but do not check the filter in origin.
Auto Trait Implementations
impl<T> RefUnwindSafe for Call<T> where
T: RefUnwindSafe,
<T as Config>::AccountId: RefUnwindSafe,
impl<T> UnwindSafe for Call<T> where
T: UnwindSafe,
<T as Config>::AccountId: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
T: Encode,
impl<'_, T> EncodeLike<&'_ T> for T where
T: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for T where
T: Encode,
impl<T> EncodeLike<Arc<T>> for T where
T: Encode,
impl<T> EncodeLike<Rc<T>> for T where
T: Encode,
impl<T> MaybeDebug for T where
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,