pub struct LauncherSynchronousProxy { /* private fields */ }
Implementations§
Source§impl LauncherSynchronousProxy
impl LauncherSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<LauncherEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<LauncherEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn launch(
&self,
info: LaunchInfo,
___deadline: MonotonicInstant,
) -> Result<(i32, Option<Process>), Error>
pub fn launch( &self, info: LaunchInfo, ___deadline: MonotonicInstant, ) -> Result<(i32, Option<Process>), Error>
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
.
Sourcepub fn create_without_starting(
&self,
info: LaunchInfo,
___deadline: MonotonicInstant,
) -> Result<(i32, Option<Box<ProcessStartData>>), Error>
pub fn create_without_starting( &self, info: LaunchInfo, ___deadline: MonotonicInstant, ) -> Result<(i32, Option<Box<ProcessStartData>>), Error>
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
.
Sourcepub fn add_args(&self, args: &[Vec<u8>]) -> Result<(), Error>
pub fn add_args(&self, args: &[Vec<u8>]) -> Result<(), Error>
Adds the given arguments to the command-line for the process.
Calling this method multiple times concatenates the arguments.
Sourcepub fn add_environs(&self, environ: &[Vec<u8>]) -> Result<(), Error>
pub fn add_environs(&self, environ: &[Vec<u8>]) -> Result<(), Error>
Adds the given variables to the environment variables for the process.
Calling this method multiple times concatenates the variables.
Sourcepub fn add_names(&self, names: Vec<NameInfo>) -> Result<(), Error>
pub fn add_names(&self, names: Vec<NameInfo>) -> Result<(), Error>
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.
Sourcepub fn add_handles(&self, handles: Vec<HandleInfo>) -> Result<(), Error>
pub fn add_handles(&self, handles: Vec<HandleInfo>) -> Result<(), Error>
Adds the given handles to the startup handles for the process.
Calling this method multiple times concatenates the handles.
Sourcepub fn set_options(&self, options: u32) -> Result<(), Error>
pub fn set_options(&self, options: u32) -> Result<(), Error>
Sets the options with which the process is created.
Calling this method multiple times will overwrite the current options.
Trait Implementations§
Source§impl Debug for LauncherSynchronousProxy
impl Debug for LauncherSynchronousProxy
Source§impl SynchronousProxy for LauncherSynchronousProxy
impl SynchronousProxy for LauncherSynchronousProxy
Source§type Proxy = LauncherProxy
type Proxy = LauncherProxy
Source§type Protocol = LauncherMarker
type Protocol = LauncherMarker
Proxy
controls.