Trait LauncherServerHandler

Source
pub trait LauncherServerHandler<___T: Transport> {
    // Required methods
    fn launch(
        &mut self,
        sender: &ServerSender<___T, Launcher>,
        request: RequestBuffer<___T, Launch>,
        responder: Responder<Launch>,
    );
    fn create_without_starting(
        &mut self,
        sender: &ServerSender<___T, Launcher>,
        request: RequestBuffer<___T, CreateWithoutStarting>,
        responder: Responder<CreateWithoutStarting>,
    );
    fn add_args(
        &mut self,
        sender: &ServerSender<___T, Launcher>,
        request: RequestBuffer<___T, AddArgs>,
    );
    fn add_environs(
        &mut self,
        sender: &ServerSender<___T, Launcher>,
        request: RequestBuffer<___T, AddEnvirons>,
    );
    fn add_names(
        &mut self,
        sender: &ServerSender<___T, Launcher>,
        request: RequestBuffer<___T, AddNames>,
    );
    fn add_handles(
        &mut self,
        sender: &ServerSender<___T, Launcher>,
        request: RequestBuffer<___T, AddHandles>,
    );
    fn set_options(
        &mut self,
        sender: &ServerSender<___T, Launcher>,
        request: RequestBuffer<___T, SetOptions>,
    );
}
Expand description

A server handler for the Launcher protocol.

See Launcher for more details.

Required Methods§

Source

fn launch( &mut self, sender: &ServerSender<___T, Launcher>, request: RequestBuffer<___T, Launch>, responder: Responder<Launch>, )

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.

Source

fn create_without_starting( &mut self, sender: &ServerSender<___T, Launcher>, request: RequestBuffer<___T, CreateWithoutStarting>, responder: Responder<CreateWithoutStarting>, )

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.

Source

fn add_args( &mut self, sender: &ServerSender<___T, Launcher>, request: RequestBuffer<___T, AddArgs>, )

Adds the given arguments to the command-line for the process.

Calling this method multiple times concatenates the arguments.

Source

fn add_environs( &mut self, sender: &ServerSender<___T, Launcher>, request: RequestBuffer<___T, AddEnvirons>, )

Adds the given variables to the environment variables for the process.

Calling this method multiple times concatenates the variables.

Source

fn add_names( &mut self, sender: &ServerSender<___T, Launcher>, request: RequestBuffer<___T, AddNames>, )

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.

Source

fn add_handles( &mut self, sender: &ServerSender<___T, Launcher>, request: RequestBuffer<___T, AddHandles>, )

Adds the given handles to the startup handles for the process.

Calling this method multiple times concatenates the handles.

Source

fn set_options( &mut self, sender: &ServerSender<___T, Launcher>, request: RequestBuffer<___T, SetOptions>, )

Sets the options with which the process is created.

Calling this method multiple times will overwrite the current options.

Implementors§