Trait pallet_msa::types::PermittedDelegationSchemas
source · pub trait PermittedDelegationSchemas<T: Config> {
// Required methods
fn try_insert_schema(
&mut self,
schema_id: SchemaId
) -> Result<(), DispatchError>;
fn try_get_mut_schema(
&mut self,
schema_id: SchemaId,
block_number: BlockNumberFor<T>
) -> Result<(), DispatchError>;
// Provided methods
fn try_insert_schemas(
&mut self,
schema_ids: Vec<SchemaId>
) -> Result<(), DispatchError> { ... }
fn try_get_mut_schemas(
&mut self,
schema_ids: Vec<SchemaId>,
block_number: BlockNumberFor<T>
) -> Result<(), DispatchError> { ... }
}
Expand description
The interface for mutating schemas permissions in a delegation relationship.
Required Methods§
sourcefn try_insert_schema(
&mut self,
schema_id: SchemaId
) -> Result<(), DispatchError>
fn try_insert_schema( &mut self, schema_id: SchemaId ) -> Result<(), DispatchError>
Attempt to insert a new schema. Dispatches error when the max allowed schemas are exceeded.
sourcefn try_get_mut_schema(
&mut self,
schema_id: SchemaId,
block_number: BlockNumberFor<T>
) -> Result<(), DispatchError>
fn try_get_mut_schema( &mut self, schema_id: SchemaId, block_number: BlockNumberFor<T> ) -> Result<(), DispatchError>
Attempt get and mutate a schema. Dispatches error when a schema cannot be found.
Provided Methods§
sourcefn try_insert_schemas(
&mut self,
schema_ids: Vec<SchemaId>
) -> Result<(), DispatchError>
fn try_insert_schemas( &mut self, schema_ids: Vec<SchemaId> ) -> Result<(), DispatchError>
Attempt to insert a collection of schemas. Dispatches error when the max allowed schemas are exceeded.
sourcefn try_get_mut_schemas(
&mut self,
schema_ids: Vec<SchemaId>,
block_number: BlockNumberFor<T>
) -> Result<(), DispatchError>
fn try_get_mut_schemas( &mut self, schema_ids: Vec<SchemaId>, block_number: BlockNumberFor<T> ) -> Result<(), DispatchError>
Attempt get and mutate a collection of schemas. Dispatches error when a schema cannot be found.
Implementors§
impl<T: Config> PermittedDelegationSchemas<T> for Delegation<SchemaId, BlockNumberFor<T>, T::MaxSchemaGrantsPerDelegation>
Implementation of SchemaPermission trait on Delegation type.