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 from_snapshot(snapshot: ProcessSessionPermissionSnapshot) -> Self
pub fn from_snapshot(snapshot: ProcessSessionPermissionSnapshot) -> Self
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<Self, ProcessRunnerError>
pub fn from_inherited_view( view: &ProcessSessionPermissionView, ) -> Result<Self, 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: PermissionedProcessRunnerFactory>(
self,
backend: Factory,
) -> SessionPermissionedProcessRunnerFactory<Factory>
pub fn with_factory<Factory: PermissionedProcessRunnerFactory>( self, backend: Factory, ) -> SessionPermissionedProcessRunnerFactory<Factory>
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.