Enum Error

Source
pub enum Error<T> {
Show 45 variants AgentDoesNotExist, NotEnoughStakeToWithdraw, NotEnoughBalanceToStake, TooManyAgentRegistrationsThisBlock, TooManyAgentRegistrationsThisInterval, AgentAlreadyRegistered, CouldNotConvertToBalance, BalanceNotAdded, StakeNotRemoved, InvalidShares, NotEnoughBalanceToRegisterAgent, StakeNotAdded, BalanceNotRemoved, BalanceCouldNotBeRemoved, NotEnoughStakeToRegister, StillRegistered, NotEnoughBalanceToTransfer, InvalidAgentMetadata, AgentMetadataTooLong, AgentMetadataTooShort, InvalidMinBurn, InvalidMaxBurn, AgentNameTooLong, AgentNameTooShort, InvalidAgentName, AgentUrlTooLong, AgentUrlTooShort, InvalidAgentUrl, AgentNameAlreadyExists, StakeTooSmall, AgentKeyNotWhitelisted, InvalidAmount, InvalidStakingFee, InvalidWeightControlFee, AgentUpdateOnCooldown, InvalidNamespacePath, NamespaceAlreadyExists, NamespaceNotFound, ParentNamespaceNotFound, NotNamespaceOwner, NamespaceHasChildren, NamespaceDepthExceeded, NamespaceBeingDelegated, AgentsFrozen, NamespacesFrozen, // some variants omitted
}
Expand description

The Error enum of this pallet.

Variants§

§

AgentDoesNotExist

The specified agent does not exist.

§

NotEnoughStakeToWithdraw

Insufficient stake to withdraw the requested amount.

§

NotEnoughBalanceToStake

Insufficient balance in the cold key account to stake the requested amount.

§

TooManyAgentRegistrationsThisBlock

The number of agent registrations in this block exceeds the allowed limit.

§

TooManyAgentRegistrationsThisInterval

The number of agent registrations in this interval exceeds the allowed limit.

§

AgentAlreadyRegistered

The agent is already registered in the active set.

§

CouldNotConvertToBalance

Failed to convert between u128 and T::Balance.

§

BalanceNotAdded

Failed to add balance to the account.

§

StakeNotRemoved

Failed to remove stake from the account.

§

InvalidShares

Invalid shares distribution.

§

NotEnoughBalanceToRegisterAgent

Insufficient balance to register.

§

StakeNotAdded

Failed to add stake to the account.

§

BalanceNotRemoved

Failed to remove balance from the account.

§

BalanceCouldNotBeRemoved

Balance could not be removed from the account.

§

NotEnoughStakeToRegister

Insufficient stake to register.

§

StillRegistered

The entity is still registered and cannot be modified.

§

NotEnoughBalanceToTransfer

Insufficient balance to transfer.

§

InvalidAgentMetadata

The agent metadata is invalid.

§

AgentMetadataTooLong

The agent metadata is too long.

§

AgentMetadataTooShort

The agent metadata is too long.

§

InvalidMinBurn

The minimum burn value is invalid, likely too small.

§

InvalidMaxBurn

The maximum burn value is invalid.

§

AgentNameTooLong

The agent name is too long.

§

AgentNameTooShort

The agent name is too short.

§

InvalidAgentName

The agent name is invalid. It must be a UTF-8 encoded string.

§

AgentUrlTooLong

The agent url is too long.

§

AgentUrlTooShort

The agent url is too short.

§

InvalidAgentUrl

The agent ur; is invalid.

§

AgentNameAlreadyExists

A agent with this name already exists in the subnet.

§

StakeTooSmall

The stake amount to add or remove is too small. Minimum is 0.5 unit.

§

AgentKeyNotWhitelisted

Key is not present in Whitelist, it needs to be whitelisted by a Curator

§

InvalidAmount

The amount given is 0

§

InvalidStakingFee

The staking fee given is lower than the minimum fee

§

InvalidWeightControlFee

The weight control fee given is lower than the minimum fee

§

AgentUpdateOnCooldown

The agent already updated recently

§

InvalidNamespacePath

Invalid namespace path

§

NamespaceAlreadyExists

Namespace already exists

§

NamespaceNotFound

Namespace not found

§

ParentNamespaceNotFound

Parent namespace not found

§

NotNamespaceOwner

Not the owner of the namespace

§

NamespaceHasChildren

Cannot delete namespace with children

§

NamespaceDepthExceeded

Namespace depth exceeded

§

NamespaceBeingDelegated

The namespace is being delegated through a permission. Revoke that first.

§

AgentsFrozen

Agent Creation was disabled by a curator.

§

NamespacesFrozen

Namespace Creation was disabled by a curator.

Trait Implementations§

Source§

impl<T: Config> Debug for Error<T>

Source§

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

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

impl<T> Decode for Error<T>

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<T> Encode for Error<T>

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<T: Config> From<Error<T>> for &'static str

Source§

fn from(err: Error<T>) -> &'static str

Converts to this type from the input type.
Source§

impl<T: Config> From<Error<T>> for DispatchError

Source§

fn from(err: Error<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> PalletError for Error<T>

Source§

const MAX_ENCODED_SIZE: usize = 1usize

The maximum encoded size for the implementing type. Read more
Source§

impl<T> TypeInfo for Error<T>
where PhantomData<T>: TypeInfo + 'static, T: 'static,

Source§

type Identity = Error<T>

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<T> EncodeLike for Error<T>

Auto Trait Implementations§

§

impl<T> Freeze for Error<T>

§

impl<T> RefUnwindSafe for Error<T>
where T: RefUnwindSafe,

§

impl<T> Send for Error<T>
where T: Send,

§

impl<T> Sync for Error<T>
where T: Sync,

§

impl<T> Unpin for Error<T>
where T: Unpin,

§

impl<T> UnwindSafe for Error<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CheckedConversion for T

§

fn checked_from<T>(t: T) -> Option<Self>
where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
§

fn checked_into<T>(self) -> Option<T>
where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
§

impl<T> DecodeAll for T
where T: Decode,

§

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 T
where T: Decode,

§

fn decode_all_with_depth_limit( limit: u32, input: &mut &[u8], ) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
§

fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>
where I: Input,

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Hashable for T
where T: Codec,

§

fn blake2_128(&self) -> [u8; 16]

§

fn blake2_256(&self) -> [u8; 32]

§

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

§

fn twox_128(&self) -> [u8; 16]

§

fn twox_256(&self) -> [u8; 32]

§

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

§

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

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T, U> IntoKey<U> for T
where U: FromKey<T>,

§

fn into_key(self) -> U

§

impl<T> IsType<T> for T

§

fn from_ref(t: &T) -> &T

Cast reference.
§

fn into_ref(&self) -> &T

Cast reference.
§

fn from_mut(t: &mut T) -> &mut T

Cast mutable reference.
§

fn into_mut(&mut self) -> &mut T

Cast mutable reference.
§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

§

impl<T> KeyedVec for T
where T: Codec,

§

fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>

Return an encoding of Self prepended by given slice.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SaturatedConversion for T

§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> TryIntoKey<U> for T
where U: TryFromKey<T>,

§

type Error = <U as TryFromKey<T>>::Error

§

fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>

§

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithPostDispatchInfo for T
where T: Into<DispatchError>,

§

fn with_weight( self, actual_weight: Weight, ) -> DispatchErrorWithPostInfo<PostDispatchInfo>

Call this on your modules custom errors type in order to return a custom weight on error. Read more
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<S> Codec for S
where S: Decode + Encode,

§

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<Box<T>> for T
where T: Encode,

§

impl<T> EncodeLike<Rc<T>> for T
where T: Encode,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<S> FullCodec for S
where S: Decode + FullEncode,

§

impl<S> FullEncode for S
where S: Encode + EncodeLike,

§

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeDebug for T
where T: Debug,

§

impl<T> MaybeRefUnwindSafe for T
where T: RefUnwindSafe,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> StaticTypeInfo for T
where T: TypeInfo + 'static,