pub struct Session { /* private fields */ }Expand description
An isolated, named execution context owned by a SessionKernel.
Implementations§
Source§impl Session
impl Session
pub fn spec(&self) -> &SessionSpec
pub fn id(&self) -> &SessionId
pub fn name(&self) -> &str
pub fn state(&self) -> SessionState
pub fn filesystem_mount(&self) -> Option<SessionMountId>
pub fn eval(&mut self, source: &str) -> Result<String, String>
pub fn current_namespace(&self) -> String
pub fn native_execution_telemetry( &self, ) -> Result<NativeExecutionTelemetry, String>
pub fn install_native_socket_provider(&mut self)
pub fn install_native_process_provider(&mut self)
Source§impl Session
impl Session
Sourcepub fn register_live_session(
&mut self,
live_session: Box<dyn LiveSession>,
) -> Result<LiveSessionState, LiveSessionError>
pub fn register_live_session( &mut self, live_session: Box<dyn LiveSession>, ) -> Result<LiveSessionState, LiveSessionError>
Transfers one backend-neutral live session into this Session’s private lifecycle. Live-session identities cannot be reused, including after a nested session has been cancelled or disposed.
Sourcepub fn start_interpreter_live_session(
&mut self,
live_session_id: impl Into<String>,
source: LiveSource,
) -> Result<LiveSessionState, LiveSessionError>
pub fn start_interpreter_live_session( &mut self, live_session_id: impl Into<String>, source: LiveSource, ) -> Result<LiveSessionState, LiveSessionError>
Starts the authoritative interpreter target as a built-in controlling instrument over this Session’s Runtime-owned instrumentation hub.
pub fn live_session_ids(&self) -> Vec<String>
pub fn live_session_count(&self) -> usize
pub fn live_session_state( &self, live_session_id: &str, ) -> Result<LiveSessionState, LiveSessionError>
pub fn live_session_capabilities( &self, live_session_id: &str, ) -> Result<LiveSessionCapabilities, LiveSessionError>
Sourcepub fn dispatch_live_session(
&mut self,
request: LiveSessionRequest,
) -> Result<LiveSessionReply, LiveSessionError>
pub fn dispatch_live_session( &mut self, request: LiveSessionRequest, ) -> Result<LiveSessionReply, LiveSessionError>
Dispatches one fenced command to a live session owned by this Session. The request is never routed through Sandbox and backend objects never leave the owning Session.
Trait Implementations§
Source§impl<'a> IApplicable<Session, &'a str> for Session
impl<'a> IApplicable<Session, &'a str> for Session
type Output = Result<String, String>
fn apply_in(&self, runtime: &mut Session, source: &'a str) -> Self::Output
fn apply_default(&mut self) -> &mut Session
fn transform_in(&self, _runtime: &Session, source: &'a str) -> &'a str
fn transform_out( &self, _runtime: &Session, _source: &'a str, value: Self::Output, ) -> Self::Output
Source§impl IComponent for Session
impl IComponent for Session
Auto Trait Implementations§
impl !Freeze for Session
impl !RefUnwindSafe for Session
impl !Send for Session
impl !Sync for Session
impl !UnwindSafe for Session
impl Unpin for Session
impl UnsafeUnpin for Session
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more