pub struct ProcessSession { /* private fields */ }Expand description
One process execution boundary used by a runtime instance.
The admission and both runner capabilities are kept together so callers
cannot accidentally pair a runner with a permission factory from another
backend configuration. Child runtimes obtain their process session through
ProcessBackend::new_session or ProcessBackend::new_session_with,
whose backend controls session isolation.
Implementations§
Source§impl ProcessSession
impl ProcessSession
Sourcepub fn from_parts(
admission: AcceptedLocalWorkspaceProcessAdmission,
runner: Arc<dyn ProcessRunner>,
permissioned_factory: Arc<dyn PermissionedProcessRunnerFactory>,
) -> Self
pub fn from_parts( admission: AcceptedLocalWorkspaceProcessAdmission, runner: Arc<dyn ProcessRunner>, permissioned_factory: Arc<dyn PermissionedProcessRunnerFactory>, ) -> Self
Creates a session from an explicit, trusted adapter boundary.
Production callers should select LocalProcessBackend::new so the
admission, runner, and reviewed-action factory are produced by one
backend implementation. This constructor exists for adapters and
deterministic fixtures that already own all three components.
Sourcepub fn with_permission_view(self, view: ProcessSessionPermissionView) -> Self
pub fn with_permission_view(self, view: ProcessSessionPermissionView) -> Self
Attaches a read-only view of this session’s retained permissions so child runtimes may inherit already-approved ordinary capabilities without mutating the parent session.
Sourcepub const fn admission(&self) -> AcceptedLocalWorkspaceProcessAdmission
pub const fn admission(&self) -> AcceptedLocalWorkspaceProcessAdmission
Returns the runtime admission selected for this process boundary.
Sourcepub fn runner(&self) -> Arc<dyn ProcessRunner> ⓘ
pub fn runner(&self) -> Arc<dyn ProcessRunner> ⓘ
Returns the runner for ordinary process actions.
Sourcepub fn permissioned_factory(&self) -> Arc<dyn PermissionedProcessRunnerFactory> ⓘ
pub fn permissioned_factory(&self) -> Arc<dyn PermissionedProcessRunnerFactory> ⓘ
Returns the factory for reviewed process actions.
Sourcepub fn permission_view(&self) -> Option<ProcessSessionPermissionView>
pub fn permission_view(&self) -> Option<ProcessSessionPermissionView>
Returns a read-only view of capabilities retained by this session, when backed by a session-scoped permission store.