pub struct LivePolicyBaseline { /* private fields */ }Expand description
Immutable point-in-time policy baseline shared atomically across file tools, web/browser tools, host-process backends, and child sessions.
Implementations§
Source§impl LivePolicyBaseline
impl LivePolicyBaseline
Sourcepub fn new(
restricted: bool,
workspace_access: Option<WorkspaceAccessPolicy>,
product_private_paths: Vec<PathBuf>,
network_access: NetworkAccessPolicy,
) -> Self
pub fn new( restricted: bool, workspace_access: Option<WorkspaceAccessPolicy>, product_private_paths: Vec<PathBuf>, network_access: NetworkAccessPolicy, ) -> Self
Constructs a new immutable policy baseline.
Sourcepub const fn is_restricted(&self) -> bool
pub const fn is_restricted(&self) -> bool
Returns whether workspace sandbox restrictions are active (--sandbox workspace).
Sourcepub fn workspace_access(&self) -> Option<&WorkspaceAccessPolicy>
pub fn workspace_access(&self) -> Option<&WorkspaceAccessPolicy>
Returns the workspace access policy active under --sandbox workspace,
or None under --sandbox off.
Sourcepub fn product_private_paths(&self) -> &[PathBuf]
pub fn product_private_paths(&self) -> &[PathBuf]
Returns built-in Merry protected credential paths (providers/,
MERRY_API_KEY_FILE) guarded by approval even in --sandbox off.
Sourcepub fn network_access(&self) -> &NetworkAccessPolicy
pub fn network_access(&self) -> &NetworkAccessPolicy
Returns the outbound network and domain policy baseline.
Trait Implementations§
Source§impl Clone for LivePolicyBaseline
impl Clone for LivePolicyBaseline
Auto Trait Implementations§
impl Forget for LivePolicyBaseline
impl Freeze for LivePolicyBaselinewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<ResolvedPathRule>: Freeze,
*const ArcInner<RwLock<ProcessSessionPermissionState>> is !null: Freeze,
PhantomData<ArcInner<RwLock<ProcessSessionPermissionState>>>: Freeze,
PhantomData<PathBuf>: Freeze,
*const LeafNode<String, SetValZST> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, SetValZST)>>: Freeze,
impl Move for LivePolicyBaseline
impl RefUnwindSafe for LivePolicyBaseline
impl Send for LivePolicyBaseline
impl Sync for LivePolicyBaseline
impl Unpin for LivePolicyBaseline
impl UnsafeUnpin for LivePolicyBaselinewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ResolvedPathRule>: UnsafeUnpin,
*const ArcInner<RwLock<ProcessSessionPermissionState>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<ProcessSessionPermissionState>>>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
impl UnwindSafe for LivePolicyBaselinewhere
RawVecInner: UnwindSafe,
Arc<RwLock<ProcessSessionPermissionState>>: UnwindSafe,
BTreeMap<String, SetValZST>: UnwindSafe,
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