pub struct SessionManager { /* private fields */ }
Expand description
Manages the session lifecycle and provides services to control the session.
Implementations§
source§impl SessionManager
impl SessionManager
sourcepub fn new(realm: RealmProxy, inspector: &Inspector) -> Self
pub fn new(realm: RealmProxy, inspector: &Inspector) -> Self
sourcepub async fn launch_startup_session(
&mut self,
session_url: String
) -> Result<(), Error>
pub async fn launch_startup_session( &mut self, session_url: String ) -> Result<(), Error>
Launch the session with the component URL in session_url
.
Errors
Returns an error if the session could not be launched.
sourcepub async fn serve(
&mut self,
fs: &mut ServiceFs<ServiceObjLocal<'_, IncomingRequest>>
) -> Result<(), Error>
pub async fn serve( &mut self, fs: &mut ServiceFs<ServiceObjLocal<'_, IncomingRequest>> ) -> Result<(), Error>
Starts serving IncomingRequest
from svc
.
This will return once the ServiceFs
stops serving requests.
Errors
Returns an error if there is an issue serving the svc
directory handle.
sourcepub async fn handle_manager_request_stream(
request_stream: ManagerRequestStream,
manager_proxy: ManagerProxy
) -> Result<(), Error>
pub async fn handle_manager_request_stream( request_stream: ManagerRequestStream, manager_proxy: ManagerProxy ) -> Result<(), Error>
Serves a specified [ManagerRequestStream
].
Parameters
request_stream
: the ManagerRequestStream.manager_proxy
: the ManagerProxy that will handle the relayed commands.
Errors
When an error is encountered reading from the request stream.
sourcepub async fn handle_graphical_presenter_request_stream(
request_stream: GraphicalPresenterRequestStream,
graphical_presenter_proxy: GraphicalPresenterProxy
) -> Result<(), Error>
pub async fn handle_graphical_presenter_request_stream( request_stream: GraphicalPresenterRequestStream, graphical_presenter_proxy: GraphicalPresenterProxy ) -> Result<(), Error>
Serves a specified [GraphicalPresenterRequestStream
].
Parameters
request_stream
: the GraphicalPresenterRequestStream.graphical_presenter_proxy
: the GraphicalPresenterProxy that will handle the relayed commands.
Errors
When an error is encountered reading from the request stream.
sourcepub async fn handle_launcher_request_stream(
&mut self,
request_stream: LauncherRequestStream
) -> Result<(), Error>
pub async fn handle_launcher_request_stream( &mut self, request_stream: LauncherRequestStream ) -> Result<(), Error>
Serves a specified LauncherRequestStream
.
Parameters
request_stream
: the LauncherRequestStream.
Errors
When an error is encountered reading from the request stream.
sourcepub async fn handle_restarter_request_stream(
&mut self,
request_stream: RestarterRequestStream
) -> Result<(), Error>
pub async fn handle_restarter_request_stream( &mut self, request_stream: RestarterRequestStream ) -> Result<(), Error>
Serves a specified RestarterRequestStream
.
Parameters
request_stream
: the RestarterRequestStream.
Errors
When an error is encountered reading from the request stream.
Trait Implementations§
source§impl Clone for SessionManager
impl Clone for SessionManager
source§fn clone(&self) -> SessionManager
fn clone(&self) -> SessionManager
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more