pub enum ITIP20Errors {
Show 21 variants
InsufficientBalance(InsufficientBalance),
InsufficientAllowance(InsufficientAllowance),
SupplyCapExceeded(SupplyCapExceeded),
InvalidSupplyCap(InvalidSupplyCap),
InvalidPayload(InvalidPayload),
PolicyForbids(PolicyForbids),
InvalidRecipient(InvalidRecipient),
ContractPaused(ContractPaused),
InvalidCurrency(InvalidCurrency),
InvalidQuoteToken(InvalidQuoteToken),
InvalidAmount(InvalidAmount),
NoOptedInSupply(NoOptedInSupply),
Unauthorized(Unauthorized),
ProtectedAddress(ProtectedAddress),
InvalidToken(InvalidToken),
Uninitialized(Uninitialized),
InvalidTransferPolicyId(InvalidTransferPolicyId),
PermitExpired(PermitExpired),
InvalidSignature(InvalidSignature),
LogoURITooLong(LogoURITooLong),
InvalidLogoURI(InvalidLogoURI),
}Expand description
Container for all the ITIP20 custom errors.
Variants§
InsufficientBalance(InsufficientBalance)
InsufficientAllowance(InsufficientAllowance)
SupplyCapExceeded(SupplyCapExceeded)
InvalidSupplyCap(InvalidSupplyCap)
InvalidPayload(InvalidPayload)
PolicyForbids(PolicyForbids)
InvalidRecipient(InvalidRecipient)
ContractPaused(ContractPaused)
InvalidCurrency(InvalidCurrency)
InvalidQuoteToken(InvalidQuoteToken)
InvalidAmount(InvalidAmount)
NoOptedInSupply(NoOptedInSupply)
ProtectedAddress(ProtectedAddress)
InvalidToken(InvalidToken)
Uninitialized(Uninitialized)
InvalidTransferPolicyId(InvalidTransferPolicyId)
PermitExpired(PermitExpired)
InvalidSignature(InvalidSignature)
LogoURITooLong(LogoURITooLong)
InvalidLogoURI(InvalidLogoURI)
Implementations§
Source§impl ITIP20Errors
impl ITIP20Errors
Sourcepub const SELECTORS: &'static [[u8; 4]]
pub const SELECTORS: &'static [[u8; 4]]
All the selectors of this enum.
Note that the selectors might not be in the same order as the variants. No guarantees are made about the order of the selectors.
Prefer using SolInterface methods instead.
Sourcepub const VARIANT_NAMES: &'static [&'static str]
pub const VARIANT_NAMES: &'static [&'static str]
The names of the variants in the same order as SELECTORS.
Sourcepub const SIGNATURES: &'static [&'static str]
pub const SIGNATURES: &'static [&'static str]
The signatures in the same order as SELECTORS.
Source§impl ITIP20Errors
impl ITIP20Errors
Sourcepub fn insufficient_balance(
available: U256,
required: U256,
token: Address,
) -> Self
pub fn insufficient_balance( available: U256, required: U256, token: Address, ) -> Self
Creates a InsufficientBalance error.
error InsufficientBalance(uint256,uint256,address)Sourcepub fn insufficient_allowance() -> Self
pub fn insufficient_allowance() -> Self
Creates a InsufficientAllowance error.
error InsufficientAllowance()Sourcepub fn supply_cap_exceeded() -> Self
pub fn supply_cap_exceeded() -> Self
Creates a SupplyCapExceeded error.
error SupplyCapExceeded()Sourcepub fn invalid_supply_cap() -> Self
pub fn invalid_supply_cap() -> Self
Creates a InvalidSupplyCap error.
error InvalidSupplyCap()Sourcepub fn invalid_payload() -> Self
pub fn invalid_payload() -> Self
Creates a InvalidPayload error.
error InvalidPayload()Sourcepub fn policy_forbids() -> Self
pub fn policy_forbids() -> Self
Creates a PolicyForbids error.
error PolicyForbids()Sourcepub fn invalid_recipient() -> Self
pub fn invalid_recipient() -> Self
Creates a InvalidRecipient error.
error InvalidRecipient()Sourcepub fn contract_paused() -> Self
pub fn contract_paused() -> Self
Creates a ContractPaused error.
error ContractPaused()Sourcepub fn invalid_currency() -> Self
pub fn invalid_currency() -> Self
Creates a InvalidCurrency error.
error InvalidCurrency()Sourcepub fn invalid_quote_token() -> Self
pub fn invalid_quote_token() -> Self
Creates a InvalidQuoteToken error.
error InvalidQuoteToken()Sourcepub fn invalid_amount() -> Self
pub fn invalid_amount() -> Self
Creates a InvalidAmount error.
error InvalidAmount()Sourcepub fn no_opted_in_supply() -> Self
pub fn no_opted_in_supply() -> Self
Creates a NoOptedInSupply error.
error NoOptedInSupply()Creates a Unauthorized error.
error Unauthorized()Sourcepub fn protected_address() -> Self
pub fn protected_address() -> Self
Creates a ProtectedAddress error.
error ProtectedAddress()Sourcepub fn invalid_token() -> Self
pub fn invalid_token() -> Self
Creates a InvalidToken error.
error InvalidToken()Sourcepub fn uninitialized() -> Self
pub fn uninitialized() -> Self
Creates a Uninitialized error.
error Uninitialized()Sourcepub fn invalid_transfer_policy_id() -> Self
pub fn invalid_transfer_policy_id() -> Self
Creates a InvalidTransferPolicyId error.
error InvalidTransferPolicyId()Sourcepub fn permit_expired() -> Self
pub fn permit_expired() -> Self
Creates a PermitExpired error.
error PermitExpired()Sourcepub fn invalid_signature() -> Self
pub fn invalid_signature() -> Self
Creates a InvalidSignature error.
error InvalidSignature()Sourcepub fn logo_uri_too_long() -> Self
pub fn logo_uri_too_long() -> Self
Creates a LogoURITooLong error.
error LogoURITooLong()Sourcepub fn invalid_logo_uri() -> Self
pub fn invalid_logo_uri() -> Self
Creates a InvalidLogoURI error.
error InvalidLogoURI()Trait Implementations§
Source§impl Clone for ITIP20Errors
impl Clone for ITIP20Errors
Source§fn clone(&self) -> ITIP20Errors
fn clone(&self) -> ITIP20Errors
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ITIP20Errors
impl Debug for ITIP20Errors
Source§impl<'de> Deserialize<'de> for ITIP20Errors
impl<'de> Deserialize<'de> for ITIP20Errors
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ITIP20Errors
Source§impl PartialEq for ITIP20Errors
impl PartialEq for ITIP20Errors
Source§fn eq(&self, other: &ITIP20Errors) -> bool
fn eq(&self, other: &ITIP20Errors) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ITIP20Errors
impl Serialize for ITIP20Errors
Source§impl SolInterface for ITIP20Errors
impl SolInterface for ITIP20Errors
Source§const MIN_DATA_LENGTH: usize = 0usize
const MIN_DATA_LENGTH: usize = 0usize
Source§fn valid_selector(selector: [u8; 4]) -> bool
fn valid_selector(selector: [u8; 4]) -> bool
true if the given selector is known to this type.Source§fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> Result<Self>
fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> Result<Self>
self.Source§fn abi_decode_raw_validate(selector: [u8; 4], data: &[u8]) -> Result<Self>
fn abi_decode_raw_validate(selector: [u8; 4], data: &[u8]) -> Result<Self>
self, with validation. Read moreSource§fn abi_encoded_size(&self) -> usize
fn abi_encoded_size(&self) -> usize
Source§fn abi_encode_raw(&self, out: &mut Vec<u8>)
fn abi_encode_raw(&self, out: &mut Vec<u8>)
self into the given buffer, without any selectors.§fn type_check(selector: [u8; 4]) -> Result<(), Error>
fn type_check(selector: [u8; 4]) -> Result<(), Error>
§fn abi_encode(&self) -> Vec<u8> ⓘ
fn abi_encode(&self) -> Vec<u8> ⓘ
self into the given buffer.§fn abi_decode(data: &[u8]) -> Result<Self, Error>
fn abi_decode(data: &[u8]) -> Result<Self, Error>
self.§fn abi_decode_validate(data: &[u8]) -> Result<Self, Error>
fn abi_decode_validate(data: &[u8]) -> Result<Self, Error>
self, with validation. Read moreimpl StructuralPartialEq for ITIP20Errors
Auto Trait Implementations§
impl Freeze for ITIP20Errors
impl RefUnwindSafe for ITIP20Errors
impl Send for ITIP20Errors
impl Sync for ITIP20Errors
impl Unpin for ITIP20Errors
impl UnsafeUnpin for ITIP20Errors
impl UnwindSafe for ITIP20Errors
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<'de, T> BorrowedRpcObject<'de> for Twhere
T: RpcBorrow<'de> + RpcSend,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
impl<T> ErasedDestructor for Twhere
T: 'static,
§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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<'de, T> RpcBorrow<'de> for T
impl<T> RpcObject for Twhere
T: RpcSend + RpcRecv,
impl<T> RpcRecv for T
impl<T> RpcSend for T
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
propagate-header only.§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
add-extension only.§fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
map-request-body only.§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
map-response-body only.§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
compression-br or compression-deflate or compression-gzip or compression-zstd only.§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
decompression-br or decompression-deflate or decompression-gzip or decompression-zstd only.§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
trace only.§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
trace only.§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
follow-redirect only.§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
sensitive-headers only.§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
sensitive-headers only.§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
sensitive-headers only.§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
set-header only.§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
set-header only.§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
set-header only.§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
set-header only.§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
set-header only.§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
set-header only.§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
request-id only.§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
request-id only.x-request-id as the header name. Read more§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
request-id only.§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
request-id only.x-request-id as the header name. Read more§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
catch-panic only.500 Internal Server responses. Read more§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
limit only.413 Payload Too Large responses. Read more§fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
normalize-path only.§fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
normalize-path only.§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 96 bytes
Size for each variant:
InsufficientBalance: 88 bytesInsufficientAllowance: 0 bytesSupplyCapExceeded: 0 bytesInvalidSupplyCap: 0 bytesInvalidPayload: 0 bytesPolicyForbids: 0 bytesInvalidRecipient: 0 bytesContractPaused: 0 bytesInvalidCurrency: 0 bytesInvalidQuoteToken: 0 bytesInvalidAmount: 0 bytesNoOptedInSupply: 0 bytesUnauthorized: 0 bytesProtectedAddress: 0 bytesInvalidToken: 0 bytesUninitialized: 0 bytesInvalidTransferPolicyId: 0 bytesPermitExpired: 0 bytesInvalidSignature: 0 bytesLogoURITooLong: 0 bytesInvalidLogoURI: 0 bytes