pub struct LauncherProxy { /* private fields */ }
Implementations§
Source§impl LauncherProxy
impl LauncherProxy
Sourcepub fn take_event_stream(&self) -> LauncherEventStream
pub fn take_event_stream(&self) -> LauncherEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn launch(
&self,
info: LaunchInfo,
) -> QueryResponseFut<(i32, Option<Process>), DefaultFuchsiaResourceDialect>
pub fn launch( &self, info: LaunchInfo, ) -> QueryResponseFut<(i32, Option<Process>), DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<(i32, Option<Box<ProcessStartData>>), DefaultFuchsiaResourceDialect>
pub fn create_without_starting( &self, info: LaunchInfo, ) -> QueryResponseFut<(i32, Option<Box<ProcessStartData>>), DefaultFuchsiaResourceDialect>
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 Clone for LauncherProxy
impl Clone for LauncherProxy
Source§fn clone(&self) -> LauncherProxy
fn clone(&self) -> LauncherProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LauncherProxy
impl Debug for LauncherProxy
Source§impl LauncherProxyInterface for LauncherProxy
impl LauncherProxyInterface for LauncherProxy
type LaunchResponseFut = QueryResponseFut<(i32, Option<Process>)>
type CreateWithoutStartingResponseFut = QueryResponseFut<(i32, Option<Box<ProcessStartData>>)>
fn launch(&self, info: LaunchInfo) -> Self::LaunchResponseFut
fn create_without_starting( &self, info: LaunchInfo, ) -> Self::CreateWithoutStartingResponseFut
fn add_args(&self, args: &[Vec<u8>]) -> Result<(), Error>
fn add_environs(&self, environ: &[Vec<u8>]) -> Result<(), Error>
fn add_names(&self, names: Vec<NameInfo>) -> Result<(), Error>
fn add_handles(&self, handles: Vec<HandleInfo>) -> Result<(), Error>
fn set_options(&self, options: u32) -> Result<(), Error>
Source§impl Proxy for LauncherProxy
impl Proxy for LauncherProxy
Source§type Protocol = LauncherMarker
type Protocol = LauncherMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for LauncherProxy
impl !RefUnwindSafe for LauncherProxy
impl Send for LauncherProxy
impl Sync for LauncherProxy
impl Unpin for LauncherProxy
impl !UnwindSafe for LauncherProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)