pub enum TokenPermissions {
Allowance,
Balance,
History,
Owner,
}Variants§
Allowance
Allowance for SNIP-20 - Permission to query allowance of the owner & spender
Balance
Balance for SNIP-20 - Permission to query balance
History
History for SNIP-20 - Permission to query transfer_history & transaction_hisotry
Owner
Owner permission indicates that the bearer of this permit should be granted all the access of the creator/signer of the permit. SNIP-721 uses this to grant viewing access to all data that the permit creator owns and is whitelisted for. For SNIP-721 use, a permit with Owner permission should NEVER be given to anyone else. If someone wants to share private data, they should whitelist the address they want to share with via a SetWhitelistedApproval tx, and that address will view the data by creating their own permit with Owner permission
Trait Implementations§
Source§impl Clone for TokenPermissions
impl Clone for TokenPermissions
Source§fn clone(&self) -> TokenPermissions
fn clone(&self) -> TokenPermissions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenPermissions
impl Debug for TokenPermissions
Source§impl<'de> Deserialize<'de> for TokenPermissions
impl<'de> Deserialize<'de> for TokenPermissions
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for TokenPermissions
impl JsonSchema for TokenPermissions
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for TokenPermissions
impl PartialEq for TokenPermissions
Source§fn eq(&self, other: &TokenPermissions) -> bool
fn eq(&self, other: &TokenPermissions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TokenPermissions
impl Serialize for TokenPermissions
impl StructuralPartialEq for TokenPermissions
Auto Trait Implementations§
impl Freeze for TokenPermissions
impl RefUnwindSafe for TokenPermissions
impl Send for TokenPermissions
impl Sync for TokenPermissions
impl Unpin for TokenPermissions
impl UnsafeUnpin for TokenPermissions
impl UnwindSafe for TokenPermissions
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
Mutably borrows from an owned value. Read more