Skip to main content

Management

Trait Management 

Source
pub trait Management: Send + Sync {
    // Required methods
    fn is_controller(&self, caller: &Principal) -> bool;
    fn is_manager(&self, caller: &Principal) -> bool;
    fn check_visibility(
        &self,
        caller: &Principal,
    ) -> Result<Visibility, BoxError>;
}
Expand description

Authorization policy used by Engine.

Required Methods§

Source

fn is_controller(&self, caller: &Principal) -> bool

Returns whether caller is the engine controller.

Source

fn is_manager(&self, caller: &Principal) -> bool

Returns whether caller can manage private engine state.

Source

fn check_visibility(&self, caller: &Principal) -> Result<Visibility, BoxError>

Validates access and returns the current engine visibility.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§