Struct snip1155_reference_impl::state::permissions::Permission
source · pub struct Permission {
pub view_balance_perm: bool,
pub view_balance_exp: Expiration,
pub view_pr_metadata_perm: bool,
pub view_pr_metadata_exp: Expiration,
pub trfer_allowance_perm: Uint128,
pub trfer_allowance_exp: Expiration,
}
Expand description
struct to store permission for a [token_id, owner, allowed_addr]
combination
Fields§
§view_balance_perm: bool
§view_balance_exp: Expiration
§view_pr_metadata_perm: bool
§view_pr_metadata_exp: Expiration
§trfer_allowance_perm: Uint128
§trfer_allowance_exp: Expiration
Implementations§
source§impl Permission
impl Permission
pub fn check_view_balance_perm(&self, blockinfo: &BlockInfo) -> bool
pub fn check_view_pr_metadata_perm(&self, blockinfo: &BlockInfo) -> bool
Trait Implementations§
source§impl Clone for Permission
impl Clone for Permission
source§fn clone(&self) -> Permission
fn clone(&self) -> Permission
Returns a copy of the value. Read more
1.0.0 · 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 Permission
impl Debug for Permission
source§impl Default for Permission
impl Default for Permission
source§fn default() -> Permission
fn default() -> Permission
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for Permission
impl<'de> Deserialize<'de> for Permission
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 Permission
impl JsonSchema for Permission
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
§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<Permission> for Permission
impl PartialEq<Permission> for Permission
source§fn eq(&self, other: &Permission) -> bool
fn eq(&self, other: &Permission) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.