pub enum TokenWrapError {
Show 16 variants
WrappedMintMismatch,
BackpointerMismatch,
ZeroWrapAmount,
MintAuthorityMismatch,
EscrowOwnerMismatch,
InvalidWrappedMintOwner,
InvalidBackpointerOwner,
EscrowMismatch,
EscrowInGoodState,
UnwrappedMintHasNoMetadata,
MetaplexMetadataMismatch,
MetadataPointerMissing,
MetadataPointerUnset,
MetadataPointerMismatch,
ExternalProgramReturnedNoData,
NoSyncingToToken2022,
}Expand description
Errors that may be returned by the Token Wrap program.
Variants§
WrappedMintMismatch
Wrapped mint account address does not match expected PDA
BackpointerMismatch
Wrapped backpointer account address does not match expected PDA
ZeroWrapAmount
Wrap amount should be positive
MintAuthorityMismatch
Wrapped mint authority does not match expected PDA
EscrowOwnerMismatch
Unwrapped escrow token owner is not set to expected PDA
InvalidWrappedMintOwner
Wrapped mint account owner is not the expected token program
InvalidBackpointerOwner
Wrapped backpointer account owner is not the expected token wrap program
EscrowMismatch
Escrow account address does not match expected ATA
EscrowInGoodState
The escrow account is in a good state and cannot be recreated
UnwrappedMintHasNoMetadata
Unwrapped mint does not have the TokenMetadata extension
MetaplexMetadataMismatch
Metaplex metadata account address does not match expected PDA
MetadataPointerMissing
Metadata pointer extension missing on mint
MetadataPointerUnset
Metadata pointer is unset (None)
MetadataPointerMismatch
Provided source metadata account does not match pointer
ExternalProgramReturnedNoData
External metadata program returned no data
NoSyncingToToken2022
Instruction can only be used with spl-token wrapped mints
Trait Implementations§
Source§impl Clone for TokenWrapError
impl Clone for TokenWrapError
Source§fn clone(&self) -> TokenWrapError
fn clone(&self) -> TokenWrapError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TokenWrapError
impl Debug for TokenWrapError
Source§impl Display for TokenWrapError
impl Display for TokenWrapError
Source§impl Error for TokenWrapError
impl Error for TokenWrapError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<TokenWrapError> for ProgramError
impl From<TokenWrapError> for ProgramError
Source§fn from(e: TokenWrapError) -> Self
fn from(e: TokenWrapError) -> Self
Source§impl FromPrimitive for TokenWrapError
impl FromPrimitive for TokenWrapError
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl PartialEq for TokenWrapError
impl PartialEq for TokenWrapError
Source§impl ToStr for TokenWrapError
impl ToStr for TokenWrapError
Source§impl TryFrom<u32> for TokenWrapError
impl TryFrom<u32> for TokenWrapError
impl Eq for TokenWrapError
impl StructuralPartialEq for TokenWrapError
Auto Trait Implementations§
impl Freeze for TokenWrapError
impl RefUnwindSafe for TokenWrapError
impl Send for TokenWrapError
impl Sync for TokenWrapError
impl Unpin for TokenWrapError
impl UnwindSafe for TokenWrapError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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