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§
Sourcefn with_access_control(self, ac: Arc<AccessControl>) -> ProtectedTool<Self>
fn with_access_control(self, ac: Arc<AccessControl>) -> ProtectedTool<Self>
Wrap this tool with access control.
Sourcefn with_access_control_and_audit(
self,
ac: Arc<AccessControl>,
audit: Arc<dyn AuditSink>,
) -> ProtectedTool<Self>
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.