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§
Sourcefn is_controller(&self, caller: &Principal) -> bool
fn is_controller(&self, caller: &Principal) -> bool
Returns whether caller is the engine controller.
Sourcefn is_manager(&self, caller: &Principal) -> bool
fn is_manager(&self, caller: &Principal) -> bool
Returns whether caller can manage private engine state.
Sourcefn check_visibility(&self, caller: &Principal) -> Result<Visibility, BoxError>
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".