pub struct ProcessSessionPermissions { /* private fields */ }Expand description
Capability state owned by a single runtime session, never a global store. Network, explicitly reviewed paths, and protected metadata remain action-only.
Implementations§
Source§impl ProcessSessionPermissions
impl ProcessSessionPermissions
Sourcepub fn new() -> ProcessSessionPermissions
pub fn new() -> ProcessSessionPermissions
Creates an empty, independent session.
Sourcepub fn from_snapshot(
snapshot: ProcessSessionPermissionSnapshot,
) -> ProcessSessionPermissions
pub fn from_snapshot( snapshot: ProcessSessionPermissionSnapshot, ) -> ProcessSessionPermissions
Creates an independent session seeded with an immutable capability snapshot.
Subsequent grants retained in the returned session stay isolated from any parent or sibling sessions that produced the snapshot.
Sourcepub fn from_inherited_view(
view: &ProcessSessionPermissionView,
) -> Result<ProcessSessionPermissions, ProcessRunnerError>
pub fn from_inherited_view( view: &ProcessSessionPermissionView, ) -> Result<ProcessSessionPermissions, ProcessRunnerError>
Creates an independent session seeded from a read-only parent permission view.
§Errors
Fails closed if the parent permission lock was poisoned.
Sourcepub fn view(&self) -> ProcessSessionPermissionView
pub fn view(&self) -> ProcessSessionPermissionView
Supplies a read-only view to an ordinary or permissioned process backend.
Sourcepub fn with_factory<Factory>(
self,
backend: Factory,
) -> SessionPermissionedProcessRunnerFactory<Factory>where
Factory: PermissionedProcessRunnerFactory,
pub fn with_factory<Factory>(
self,
backend: Factory,
) -> SessionPermissionedProcessRunnerFactory<Factory>where
Factory: PermissionedProcessRunnerFactory,
Wraps an adapter with runtime-owned approval retention. The adapter must consume this session’s read-only view when constructing its runners.
Sourcepub fn clear(&self) -> Result<(), ProcessRunnerError>
pub fn clear(&self) -> Result<(), ProcessRunnerError>
Clears all retained session-scoped path and host-integration grants.
Used when a live session replaces its process sandbox configuration so previously approved capabilities do not silently outlive a tightened baseline.
§Errors
Fails closed if the session permission lock was poisoned.
Trait Implementations§
Source§impl Clone for ProcessSessionPermissions
impl Clone for ProcessSessionPermissions
Source§fn clone(&self) -> ProcessSessionPermissions
fn clone(&self) -> ProcessSessionPermissions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more