pub struct CustomGuardRegistry { /* private fields */ }Implementations§
Source§impl CustomGuardRegistry
impl CustomGuardRegistry
pub fn new() -> Self
pub fn register<F>(&mut self, factory: F) -> &mut Selfwhere
F: CustomGuardFactory + 'static,
pub fn get(&self, id: &str) -> Option<&Arc<dyn CustomGuardFactory>>
pub fn build(&self, id: &str, config: Value) -> Result<Box<dyn Guard>>
Sourcepub fn register_from_package(
&mut self,
manifest: &PkgManifest,
install_path: &Path,
) -> Result<()>
pub fn register_from_package( &mut self, manifest: &PkgManifest, install_path: &Path, ) -> Result<()>
Register all guard factories from an installed package’s manifest.
For guard packages, this scans the install directory for a
clawdstrike.plugin.toml plugin manifest, discovers guard entries,
loads their WASM entrypoints, and registers WasmGuardFactory
instances in the registry.
Non-guard packages are silently ignored (returns Ok(())).
Trait Implementations§
Source§impl Clone for CustomGuardRegistry
impl Clone for CustomGuardRegistry
Source§fn clone(&self) -> CustomGuardRegistry
fn clone(&self) -> CustomGuardRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomGuardRegistry
impl Debug for CustomGuardRegistry
Source§impl Default for CustomGuardRegistry
impl Default for CustomGuardRegistry
Source§fn default() -> CustomGuardRegistry
fn default() -> CustomGuardRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CustomGuardRegistry
impl !RefUnwindSafe for CustomGuardRegistry
impl Send for CustomGuardRegistry
impl Sync for CustomGuardRegistry
impl Unpin for CustomGuardRegistry
impl UnsafeUnpin for CustomGuardRegistry
impl !UnwindSafe for CustomGuardRegistry
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more