Enum pallet_ip_pallet::pallet::Error
source · pub enum Error<T> {
Show 21 variants
NameTooLong,
DescriptionTooLong,
FilingDateTooLong,
JurisdictionTooLong,
NftNotFound,
NotNftOwner,
NftInEscrow,
OfferNotFound,
ContractNotFound,
NotALicenseOffer,
NotAPurchaseOffer,
NotALicenseContract,
NotAPurchaseContract,
ActiveLicensesExist,
ExclusiveLicenseExists,
LicenseNotExpired,
ZeroPayment,
InsufficientBalance,
PaymentNotDue,
PaymentNotCompleted,
NotPeriodicPayment,
// some variants omitted
}Expand description
The Error enum of this pallet.
Variants§
NameTooLong
Input name exceeds Config::MaxNameLength
Emitted by Pallet::mint_nft when the NFT name is too long.
DescriptionTooLong
Input description exceeds Config::MaxDescriptionLength
Emitted by Pallet::mint_nft when the NFT description is too long.
FilingDateTooLong
Input filing date exceeds Config::MaxNameLength
Emitted by Pallet::mint_nft when the filing date string is too long.
JurisdictionTooLong
Input jurisdiction exceeds Config::MaxNameLength
Emitted by Pallet::mint_nft when the jurisdiction string is too long.
NftNotFound
The requested NFT does not exist in storage
See Nfts storage.
NotNftOwner
Account is not the owner of this NFT
Emitted when trying to create offers or modify an NFT without ownership.
See NFT::owner.
NftInEscrow
NFT is currently held in escrow
Emitted when trying to create new offers for an NFT that’s locked in a purchase contract.
See EscrowedNfts storage.
OfferNotFound
The requested offer does not exist in storage
See Offers storage.
ContractNotFound
The requested contract does not exist in storage
See Contracts storage.
NotALicenseOffer
Expected a license offer but found a different type
Emitted by Pallet::accept_license when the offer is not a crate::types::Offer::License.
NotAPurchaseOffer
Expected a purchase offer but found a different type
Emitted by Pallet::accept_purchase when the offer is not a crate::types::Offer::Purchase.
NotALicenseContract
Expected a license contract but found a different type
Emitted when trying to perform license-specific operations on a purchase contract.
NotAPurchaseContract
Expected a purchase contract but found a different type
Emitted when trying to perform purchase-specific operations on a license contract.
ActiveLicensesExist
NFT already has active license contracts
Emitted when trying to create a purchase offer while licenses are active.
See NFTContracts storage.
ExclusiveLicenseExists
NFT already has an exclusive license contract
Emitted when trying to create a new license offer while an exclusive license exists.
See crate::types::License::is_exclusive.
LicenseNotExpired
License contract has not yet expired
Emitted by Pallet::expire_license when trying to expire a license before its duration ends.
See crate::types::License::duration.
ZeroPayment
Attempted to make a zero-value payment
Emitted by payment functions when amount is 0.
InsufficientBalance
Payer account has insufficient balance
Emitted when trying to process a payment that exceeds available funds.
See Config::Currency.
PaymentNotDue
No payment is currently due for this contract
Emitted by Pallet::make_periodic_payment when called before the next payment is due.
See crate::types::PaymentSchedule::next_payment_block.
PaymentNotCompleted
Contract payments are not yet completed
Emitted when trying to finalize a contract before all payments are made.
See crate::types::PaymentSchedule::payments_due.
NotPeriodicPayment
Contract does not use periodic payments
Emitted when trying to make periodic payments on a one-time payment contract.
See crate::types::PaymentType.
Trait Implementations§
source§impl<T> Decode for Error<T>
impl<T> Decode for Error<T>
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>
§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: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
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> 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 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§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> 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>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§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<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
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 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 S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.