pub trait LauncherServerHandler<___T: Transport = Channel> {
// Required methods
fn launch(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<Launch, ___T>,
responder: Responder<Launch>,
) -> impl Future<Output = ()> + Send;
fn create_without_starting(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<CreateWithoutStarting, ___T>,
responder: Responder<CreateWithoutStarting>,
) -> impl Future<Output = ()> + Send;
fn add_args(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<AddArgs, ___T>,
) -> impl Future<Output = ()> + Send;
fn add_environs(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<AddEnvirons, ___T>,
) -> impl Future<Output = ()> + Send;
fn add_names(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<AddNames, ___T>,
) -> impl Future<Output = ()> + Send;
fn add_handles(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<AddHandles, ___T>,
) -> impl Future<Output = ()> + Send;
fn set_options(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<SetOptions, ___T>,
) -> impl Future<Output = ()> + Send;
}
Expand description
A server handler for the Launcher protocol.
See Launcher
for more details.
Required Methods§
Sourcefn launch(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<Launch, ___T>,
responder: Responder<Launch>,
) -> impl Future<Output = ()> + Send
fn launch( &mut self, sender: &ServerSender<Launcher, ___T>, request: Request<Launch, ___T>, responder: Responder<Launch>, ) -> impl Future<Output = ()> + Send
Creates and starts the process described by info
.
After processing this message, the Launcher
is reset to its initial
state and is ready to launch another process.
process
is present if, and only if, status
is ZX_OK
.
Sourcefn create_without_starting(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<CreateWithoutStarting, ___T>,
responder: Responder<CreateWithoutStarting>,
) -> impl Future<Output = ()> + Send
fn create_without_starting( &mut self, sender: &ServerSender<Launcher, ___T>, request: Request<CreateWithoutStarting, ___T>, responder: Responder<CreateWithoutStarting>, ) -> impl Future<Output = ()> + Send
Creates the process described by info
but does not start it.
After processing this message, the Launcher
is reset to its initial
state and is ready to launch another process.
The caller is responsible for calling zx_process_start
using the data
in ProcessStartData
to actually start the process.
data
is present if, and only if, status
is ZX_OK
.
Sourcefn add_args(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<AddArgs, ___T>,
) -> impl Future<Output = ()> + Send
fn add_args( &mut self, sender: &ServerSender<Launcher, ___T>, request: Request<AddArgs, ___T>, ) -> impl Future<Output = ()> + Send
Adds the given arguments to the command-line for the process.
Calling this method multiple times concatenates the arguments.
Sourcefn add_environs(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<AddEnvirons, ___T>,
) -> impl Future<Output = ()> + Send
fn add_environs( &mut self, sender: &ServerSender<Launcher, ___T>, request: Request<AddEnvirons, ___T>, ) -> impl Future<Output = ()> + Send
Adds the given variables to the environment variables for the process.
Calling this method multiple times concatenates the variables.
Sourcefn add_names(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<AddNames, ___T>,
) -> impl Future<Output = ()> + Send
fn add_names( &mut self, sender: &ServerSender<Launcher, ___T>, request: Request<AddNames, ___T>, ) -> impl Future<Output = ()> + Send
Adds the given names to the namespace for the process.
The paths in the namespace must be non-overlapping. See https://fuchsia.dev/fuchsia-src/concepts/process/namespaces for details.
Calling this method multiple times concatenates the names.
Sourcefn add_handles(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<AddHandles, ___T>,
) -> impl Future<Output = ()> + Send
fn add_handles( &mut self, sender: &ServerSender<Launcher, ___T>, request: Request<AddHandles, ___T>, ) -> impl Future<Output = ()> + Send
Adds the given handles to the startup handles for the process.
Calling this method multiple times concatenates the handles.
Sourcefn set_options(
&mut self,
sender: &ServerSender<Launcher, ___T>,
request: Request<SetOptions, ___T>,
) -> impl Future<Output = ()> + Send
fn set_options( &mut self, sender: &ServerSender<Launcher, ___T>, request: Request<SetOptions, ___T>, ) -> impl Future<Output = ()> + Send
Sets the options with which the process is created.
Calling this method multiple times will overwrite the current options.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.