ToolExt

Trait ToolExt 

Source
pub trait ToolExt: Tool + Sized {
    // Provided methods
    fn with_access_control(self, ac: Arc<AccessControl>) -> ProtectedTool<Self> { ... }
    fn with_access_control_and_audit(
        self,
        ac: Arc<AccessControl>,
        audit: Arc<dyn AuditSink>,
    ) -> ProtectedTool<Self> { ... }
}
Expand description

Extension trait for easily wrapping tools with access control.

Provided Methods§

Source

fn with_access_control(self, ac: Arc<AccessControl>) -> ProtectedTool<Self>

Wrap this tool with access control.

Source

fn with_access_control_and_audit( self, ac: Arc<AccessControl>, audit: Arc<dyn AuditSink>, ) -> ProtectedTool<Self>

Wrap this tool with access control and audit logging.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Tool> ToolExt for T