pub trait PermittedDelegationIntents<T: Config> {
// Required methods
fn try_insert_intent(
&mut self,
intent_id: IntentId,
) -> Result<(), DispatchError>;
fn try_get_mut_intent(
&mut self,
intent_id: IntentId,
block_number: BlockNumberFor<T>,
) -> Result<(), DispatchError>;
// Provided methods
fn try_insert_intents(
&mut self,
intent_ids: Vec<IntentId>,
) -> Result<(), DispatchError> { ... }
fn try_get_mut_intents(
&mut self,
intent_ids: Vec<IntentId>,
block_number: BlockNumberFor<T>,
) -> Result<(), DispatchError> { ... }
}Expand description
The interface for mutating Intent permissions in a delegation relationship.
Required Methods§
Sourcefn try_insert_intent(
&mut self,
intent_id: IntentId,
) -> Result<(), DispatchError>
fn try_insert_intent( &mut self, intent_id: IntentId, ) -> Result<(), DispatchError>
Attempt to insert a new Intent. Dispatches error when the max allowed delegations are exceeded.
Sourcefn try_get_mut_intent(
&mut self,
intent_id: IntentId,
block_number: BlockNumberFor<T>,
) -> Result<(), DispatchError>
fn try_get_mut_intent( &mut self, intent_id: IntentId, block_number: BlockNumberFor<T>, ) -> Result<(), DispatchError>
Attempt get and mutate an Intent. Dispatches error when an Intent cannot be found.
Provided Methods§
Sourcefn try_insert_intents(
&mut self,
intent_ids: Vec<IntentId>,
) -> Result<(), DispatchError>
fn try_insert_intents( &mut self, intent_ids: Vec<IntentId>, ) -> Result<(), DispatchError>
Attempt to insert a collection of Intents. Dispatches error when the max allowed delegations are exceeded.
Sourcefn try_get_mut_intents(
&mut self,
intent_ids: Vec<IntentId>,
block_number: BlockNumberFor<T>,
) -> Result<(), DispatchError>
fn try_get_mut_intents( &mut self, intent_ids: Vec<IntentId>, block_number: BlockNumberFor<T>, ) -> Result<(), DispatchError>
Attempt get and mutate a collection of Intents. Dispatches error when an Intent cannot be found.
Implementors§
impl<T: Config> PermittedDelegationIntents<T> for Delegation<IntentId, BlockNumberFor<T>, T::MaxGrantsPerDelegation>
Implementation of SchemaPermission trait on Delegation type.