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§

source

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.

source

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§

source

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.

source

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§

source§

impl<T: Config> PermittedDelegationSchemas<T> for Delegation<SchemaId, BlockNumberFor<T>, T::MaxSchemaGrantsPerDelegation>

Implementation of SchemaPermission trait on Delegation type.