[][src]Trait splinter::keys::KeyPermissionManager

pub trait KeyPermissionManager: Send {
    fn is_permitted(
        &self,
        public_key: &[u8],
        role: &str
    ) -> Result<bool, KeyPermissionError>; }

Manages role-based permissions associated with public keys.

The KeyPermissionManager provides an interface for providing details on whether or not a public key has permissions to act in specific roles.

Note: the underlying implementation determines how those values are set and modified - these operations are not exposed via this interface.

Required methods

fn is_permitted(
    &self,
    public_key: &[u8],
    role: &str
) -> Result<bool, KeyPermissionError>

Checks to see if a public key is permitted for the given role.

Errors

Returns a KeyPermissionError if the underling implementation encountered an error while checking the permissions.

Loading content...

Implementors

impl KeyPermissionManager for AllowAllKeyPermissionManager[src]

Loading content...