pub struct ShellPolicyHandle { /* private fields */ }Expand description
Clonable handle for live policy rebuilds on hot-reload.
Obtained from ShellExecutor::policy_handle at construction time and stored
on the agent. Call ShellPolicyHandle::rebuild to atomically replace the
effective blocked_commands list without recreating the executor. Reads on
the dispatch path are lock-free via ArcSwap::load_full.
Implementations§
Source§impl ShellPolicyHandle
impl ShellPolicyHandle
Sourcepub fn rebuild(&self, config: &ShellConfig)
pub fn rebuild(&self, config: &ShellConfig)
Atomically install a new effective blocklist derived from config.
§Rebuild contract
config must be the already-overlay-merged ShellConfig (i.e. the
value produced by load_config_with_overlay). Plugin contributions are
already present in config.blocked_commands at this point; this method
does NOT re-apply overlays.
Sourcepub fn snapshot_blocked(&self) -> Vec<String>
pub fn snapshot_blocked(&self) -> Vec<String>
Snapshot of the current effective blocklist.
Trait Implementations§
Source§impl Clone for ShellPolicyHandle
impl Clone for ShellPolicyHandle
Source§fn clone(&self) -> ShellPolicyHandle
fn clone(&self) -> ShellPolicyHandle
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 moreAuto Trait Implementations§
impl Freeze for ShellPolicyHandle
impl RefUnwindSafe for ShellPolicyHandle
impl Send for ShellPolicyHandle
impl Sync for ShellPolicyHandle
impl Unpin for ShellPolicyHandle
impl UnsafeUnpin for ShellPolicyHandle
impl UnwindSafe for ShellPolicyHandle
Blanket Implementations§
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