Struct grid_sdk::permissions::PermissionChecker [−][src]
pub struct PermissionChecker<'a> { /* fields omitted */ }
Expand description
Helper struct for Pike functionality.
Implementations
Returns a PermissionChecker for a certain context.
Arguments
context
- A reference to the transaction context.
pub fn has_permission(
&self,
public_key: &str,
permission: &str
) -> Result<bool, PermissionCheckerError>
pub fn has_permission(
&self,
public_key: &str,
permission: &str
) -> Result<bool, PermissionCheckerError>
Checks whether an agent with a given public key has a certain role.
Arguments
public_key
- Public key of a Pike agent.permission
- Permission string to be checked.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for PermissionChecker<'a>
impl<'a> !Send for PermissionChecker<'a>
impl<'a> !Sync for PermissionChecker<'a>
impl<'a> Unpin for PermissionChecker<'a>
impl<'a> !UnwindSafe for PermissionChecker<'a>