Enum VerifiableType
pub enum VerifiableType {
DebitAllowance(BaseSignedMessage<Payload<DebitAllowance>, Signature>),
FungibleTokenMint(BaseSignedMessage<Payload<Mint>, Signature>),
NftMint(BaseSignedMessage<Payload<Mint>, Signature>),
}Expand description
All operations that verifiably satisfy global rules and can be translated to state diffs are part of this enum.
Variants§
DebitAllowance(BaseSignedMessage<Payload<DebitAllowance>, Signature>)
Debit allowance type.
FungibleTokenMint(BaseSignedMessage<Payload<Mint>, Signature>)
New Token Mint type.
NftMint(BaseSignedMessage<Payload<Mint>, Signature>)
NFT mint type
Implementations§
§impl VerifiableType
impl VerifiableType
pub fn is_debit_allowance(&self) -> bool
pub fn is_debit_allowance(&self) -> bool
Returns true if this is a VerifiableType::DebitAllowance, otherwise false
pub fn as_debit_allowance_mut(
&mut self,
) -> Option<&mut BaseSignedMessage<Payload<DebitAllowance>, Signature>>
pub fn as_debit_allowance_mut( &mut self, ) -> Option<&mut BaseSignedMessage<Payload<DebitAllowance>, Signature>>
Optionally returns mutable references to the inner fields if this is a VerifiableType::DebitAllowance, otherwise None
pub fn as_debit_allowance(
&self,
) -> Option<&BaseSignedMessage<Payload<DebitAllowance>, Signature>>
pub fn as_debit_allowance( &self, ) -> Option<&BaseSignedMessage<Payload<DebitAllowance>, Signature>>
Optionally returns references to the inner fields if this is a VerifiableType::DebitAllowance, otherwise None
pub fn into_debit_allowance(
self,
) -> Result<BaseSignedMessage<Payload<DebitAllowance>, Signature>, VerifiableType>
pub fn into_debit_allowance( self, ) -> Result<BaseSignedMessage<Payload<DebitAllowance>, Signature>, VerifiableType>
Returns the inner fields if this is a VerifiableType::DebitAllowance, otherwise returns back the enum in the Err case of the result
pub unsafe fn into_debit_allowance_unchecked(
self,
) -> BaseSignedMessage<Payload<DebitAllowance>, Signature>
pub unsafe fn into_debit_allowance_unchecked( self, ) -> BaseSignedMessage<Payload<DebitAllowance>, Signature>
Unchecked return of the inner fields of VerifiableType::DebitAllowance.
§Safety
Results in undefined behavior when it is the incorrect variant.
pub unsafe fn as_debit_allowance_unchecked(
&self,
) -> &BaseSignedMessage<Payload<DebitAllowance>, Signature>
pub unsafe fn as_debit_allowance_unchecked( &self, ) -> &BaseSignedMessage<Payload<DebitAllowance>, Signature>
Unchecked reference of the inner fields of VerifiableType::DebitAllowance.
§Safety
Results in undefined behavior when it is the incorrect variant.
pub unsafe fn as_debit_allowance_mut_unchecked(
&mut self,
) -> &mut BaseSignedMessage<Payload<DebitAllowance>, Signature>
pub unsafe fn as_debit_allowance_mut_unchecked( &mut self, ) -> &mut BaseSignedMessage<Payload<DebitAllowance>, Signature>
Unchecked mutable reference of the inner fields of VerifiableType::DebitAllowance.
§Safety
Results in undefined behavior when it is the incorrect variant.
pub fn is_fungible_token_mint(&self) -> bool
pub fn is_fungible_token_mint(&self) -> bool
Returns true if this is a VerifiableType::FungibleTokenMint, otherwise false
pub fn as_fungible_token_mint_mut(
&mut self,
) -> Option<&mut BaseSignedMessage<Payload<Mint>, Signature>>
pub fn as_fungible_token_mint_mut( &mut self, ) -> Option<&mut BaseSignedMessage<Payload<Mint>, Signature>>
Optionally returns mutable references to the inner fields if this is a VerifiableType::FungibleTokenMint, otherwise None
pub fn as_fungible_token_mint(
&self,
) -> Option<&BaseSignedMessage<Payload<Mint>, Signature>>
pub fn as_fungible_token_mint( &self, ) -> Option<&BaseSignedMessage<Payload<Mint>, Signature>>
Optionally returns references to the inner fields if this is a VerifiableType::FungibleTokenMint, otherwise None
pub fn into_fungible_token_mint(
self,
) -> Result<BaseSignedMessage<Payload<Mint>, Signature>, VerifiableType>
pub fn into_fungible_token_mint( self, ) -> Result<BaseSignedMessage<Payload<Mint>, Signature>, VerifiableType>
Returns the inner fields if this is a VerifiableType::FungibleTokenMint, otherwise returns back the enum in the Err case of the result
pub unsafe fn into_fungible_token_mint_unchecked(
self,
) -> BaseSignedMessage<Payload<Mint>, Signature>
pub unsafe fn into_fungible_token_mint_unchecked( self, ) -> BaseSignedMessage<Payload<Mint>, Signature>
Unchecked return of the inner fields of VerifiableType::FungibleTokenMint.
§Safety
Results in undefined behavior when it is the incorrect variant.
pub unsafe fn as_fungible_token_mint_unchecked(
&self,
) -> &BaseSignedMessage<Payload<Mint>, Signature>
pub unsafe fn as_fungible_token_mint_unchecked( &self, ) -> &BaseSignedMessage<Payload<Mint>, Signature>
Unchecked reference of the inner fields of VerifiableType::FungibleTokenMint.
§Safety
Results in undefined behavior when it is the incorrect variant.
pub unsafe fn as_fungible_token_mint_mut_unchecked(
&mut self,
) -> &mut BaseSignedMessage<Payload<Mint>, Signature>
pub unsafe fn as_fungible_token_mint_mut_unchecked( &mut self, ) -> &mut BaseSignedMessage<Payload<Mint>, Signature>
Unchecked mutable reference of the inner fields of VerifiableType::FungibleTokenMint.
§Safety
Results in undefined behavior when it is the incorrect variant.
pub fn is_nft_mint(&self) -> bool
pub fn is_nft_mint(&self) -> bool
Returns true if this is a VerifiableType::NftMint, otherwise false
pub fn as_nft_mint_mut(
&mut self,
) -> Option<&mut BaseSignedMessage<Payload<Mint>, Signature>>
pub fn as_nft_mint_mut( &mut self, ) -> Option<&mut BaseSignedMessage<Payload<Mint>, Signature>>
Optionally returns mutable references to the inner fields if this is a VerifiableType::NftMint, otherwise None
pub fn as_nft_mint(
&self,
) -> Option<&BaseSignedMessage<Payload<Mint>, Signature>>
pub fn as_nft_mint( &self, ) -> Option<&BaseSignedMessage<Payload<Mint>, Signature>>
Optionally returns references to the inner fields if this is a VerifiableType::NftMint, otherwise None
pub fn into_nft_mint(
self,
) -> Result<BaseSignedMessage<Payload<Mint>, Signature>, VerifiableType>
pub fn into_nft_mint( self, ) -> Result<BaseSignedMessage<Payload<Mint>, Signature>, VerifiableType>
Returns the inner fields if this is a VerifiableType::NftMint, otherwise returns back the enum in the Err case of the result
pub unsafe fn into_nft_mint_unchecked(
self,
) -> BaseSignedMessage<Payload<Mint>, Signature>
pub unsafe fn into_nft_mint_unchecked( self, ) -> BaseSignedMessage<Payload<Mint>, Signature>
Unchecked return of the inner fields of VerifiableType::NftMint.
§Safety
Results in undefined behavior when it is the incorrect variant.
pub unsafe fn as_nft_mint_unchecked(
&self,
) -> &BaseSignedMessage<Payload<Mint>, Signature>
pub unsafe fn as_nft_mint_unchecked( &self, ) -> &BaseSignedMessage<Payload<Mint>, Signature>
Unchecked reference of the inner fields of VerifiableType::NftMint.
§Safety
Results in undefined behavior when it is the incorrect variant.
pub unsafe fn as_nft_mint_mut_unchecked(
&mut self,
) -> &mut BaseSignedMessage<Payload<Mint>, Signature>
pub unsafe fn as_nft_mint_mut_unchecked( &mut self, ) -> &mut BaseSignedMessage<Payload<Mint>, Signature>
Unchecked mutable reference of the inner fields of VerifiableType::NftMint.
§Safety
Results in undefined behavior when it is the incorrect variant.
§impl VerifiableType
impl VerifiableType
pub fn verifiable_id(&self) -> HashDigest
pub fn verifiable_id(&self) -> HashDigest
Returns a stable identifier for this verifiable based on its signature.
pub fn verify_signature(&self) -> Result<(), SignatureError>
pub fn verify_signature(&self) -> Result<(), SignatureError>
Verify the signature of the contained signed message
Trait Implementations§
§impl Clone for VerifiableType
impl Clone for VerifiableType
§fn clone(&self) -> VerifiableType
fn clone(&self) -> VerifiableType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl DebitTarget for VerifiableType
impl DebitTarget for VerifiableType
§fn debit_address(&self) -> Address
fn debit_address(&self) -> Address
§fn nonce_with_debit_address(&self) -> (u64, Address)
fn nonce_with_debit_address(&self) -> (u64, Address)
§impl Debug for VerifiableType
impl Debug for VerifiableType
§impl<'de> Deserialize<'de> for VerifiableType
impl<'de> Deserialize<'de> for VerifiableType
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerifiableType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerifiableType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl EnumCount for VerifiableType
impl EnumCount for VerifiableType
§impl IntoStateDiffs for VerifiableType
impl IntoStateDiffs for VerifiableType
§fn state_diffs(&self) -> Vec<StateDiff>
fn state_diffs(&self) -> Vec<StateDiff>
§impl PartialEq for VerifiableType
impl PartialEq for VerifiableType
§impl Serialize for VerifiableType
impl Serialize for VerifiableType
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for VerifiableType
impl StructuralPartialEq for VerifiableType
Auto Trait Implementations§
impl Freeze for VerifiableType
impl RefUnwindSafe for VerifiableType
impl Send for VerifiableType
impl Sync for VerifiableType
impl Unpin for VerifiableType
impl UnwindSafe for VerifiableType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request