Enum dock_runtime::did::Error
source · pub enum Error<T> {
Show 34 variants
PublicKeySizeIncorrect,
DidAlreadyExists,
DidMethodKeyExists,
DidDoesNotExist,
NotAnOffChainDid,
DidNotOwnedByAccount,
NoControllerProvided,
IncompatibleVerificationRelation,
ExpectedOffChainDid,
ExpectedOnChainDid,
InvalidSignature,
OnlyControllerCanUpdate,
NoKeyForDid,
NoControllerForDid,
InvalidSigner,
IncompatibleSignaturePublicKey,
InsufficientVerificationRelationship,
ControllerIsAlreadyAdded,
InvalidServiceEndpoint,
ServiceEndpointAlreadyExists,
ServiceEndpointDoesNotExist,
KeyAgreementCantBeUsedForSigning,
SigningKeyCantBeUsedForKeyAgreement,
ExpectedDid,
ExpectedDidMethodKey,
InvalidNonce,
OnchainDidDoesntExist,
NoEntity,
EmptyPayload,
ConversionError,
NotEnoughSignatures,
TooManySignatures,
EmptyPolicy,
TooManyControllersInPolicy,
// some variants omitted
}
Expand description
Error for the DID module.
Variants§
PublicKeySizeIncorrect
Given public key is not of the correct size
DidAlreadyExists
There is already a DID with the same value
DidMethodKeyExists
There is already a DID key with the same value
DidDoesNotExist
There is no such DID registered
NotAnOffChainDid
The DID is not an off-chain DID
DidNotOwnedByAccount
The DID is not owned by the account
NoControllerProvided
No controller was provided for the DID
IncompatibleVerificationRelation
The provided key type is not compatible with the provided verification relationship
ExpectedOffChainDid
The DID is expected to be an off-chain DID
ExpectedOnChainDid
The DID is expected to be an on-chain DID
InvalidSignature
The provided signature is invalid
OnlyControllerCanUpdate
Only the controller of a DID can update the DID Document
NoKeyForDid
No key found for the DID
NoControllerForDid
No controller found for the DID
InvalidSigner
The signer is invalid
IncompatibleSignaturePublicKey
The signature is incompatible with the provided public key
InsufficientVerificationRelationship
The key does not have the required verification relationship
ControllerIsAlreadyAdded
The controller is already added for the DID
InvalidServiceEndpoint
The service endpoint is invalid
ServiceEndpointAlreadyExists
The service endpoint already exists
ServiceEndpointDoesNotExist
The service endpoint does not exist
KeyAgreementCantBeUsedForSigning
Key agreement key cannot be used for signing
SigningKeyCantBeUsedForKeyAgreement
Signing key cannot be used for key agreement
ExpectedDid
A DID was expected
ExpectedDidMethodKey
A DID method key was expected
InvalidNonce
The provided nonce is invalid
OnchainDidDoesntExist
The on-chain DID does not exist
NoEntity
The entity does not exist
EmptyPayload
The payload is empty
ConversionError
Conversion failed
NotEnoughSignatures
Not enough signatures provided
TooManySignatures
Too many signatures provided
EmptyPolicy
Policy can’t be empty (have zero controllers)
TooManyControllersInPolicy
Policy can’t have so many controllers
Trait Implementations§
source§impl<T> Decode for Error<T>
impl<T> Decode for Error<T>
source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Error<T>, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Error<T>, Error>where __CodecInputEdqy: 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,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
source§impl<T> Encode for Error<T>
impl<T> Encode for Error<T>
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
source§fn encode_to<__CodecOutputEdqy>(&self, __codec_dest_edqy: &mut __CodecOutputEdqy)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>(&self, __codec_dest_edqy: &mut __CodecOutputEdqy)where __CodecOutputEdqy: Output + ?Sized,
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
source§impl<T> From<ActionExecutionError> for Error<T>where
T: Config,
impl<T> From<ActionExecutionError> for Error<T>where T: Config,
source§fn from(error: ActionExecutionError) -> Error<T>
fn from(error: ActionExecutionError) -> Error<T>
source§impl<T> From<Error<T>> for IntermediateError<T>where
T: Config,
impl<T> From<Error<T>> for IntermediateError<T>where T: Config,
source§fn from(err: Error<T>) -> IntermediateError<T>
fn from(err: Error<T>) -> IntermediateError<T>
source§impl<T> From<NonceError> for Error<T>where
T: Config,
impl<T> From<NonceError> for Error<T>where T: Config,
source§fn from(_: NonceError) -> Error<T>
fn from(_: NonceError) -> Error<T>
source§impl<T> From<PolicyValidationError> for Error<T>where
T: Config,
impl<T> From<PolicyValidationError> for Error<T>where T: Config,
source§fn from(error: PolicyValidationError) -> Error<T>
fn from(error: PolicyValidationError) -> Error<T>
source§impl<T> From<VerificationError> for Error<T>where
T: Config,
impl<T> From<VerificationError> for Error<T>where T: Config,
source§fn from(_: VerificationError) -> Error<T>
fn from(_: VerificationError) -> Error<T>
source§impl<T> PalletError for Error<T>
impl<T> PalletError for Error<T>
source§const MAX_ENCODED_SIZE: usize = 1usize
const MAX_ENCODED_SIZE: usize = 1usize
source§impl<T> PartialEq<Error<T>> for Error<T>where
T: PartialEq<T>,
impl<T> PartialEq<Error<T>> for Error<T>where T: PartialEq<T>,
source§impl<T> TypeInfo for Error<T>where
PhantomData<T>: TypeInfo + 'static,
T: 'static,
impl<T> TypeInfo for Error<T>where PhantomData<T>: TypeInfo + 'static, T: 'static,
impl<T> EncodeLike<Error<T>> for Error<T>
impl<T> Eq for Error<T>where T: Eq,
impl<T> StructuralEq for Error<T>
impl<T> StructuralPartialEq for Error<T>
Auto Trait Implementations§
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> CanUpdate<()> for T
impl<T> CanUpdate<()> for T
source§fn can_remove(&self, _entity: &()) -> bool
fn can_remove(&self, _entity: &()) -> bool
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where Self: TryInto<T>,
§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>
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere T: Codec,
§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> IsType<T> for T
impl<T> IsType<T> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere T: Codec,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.