pub struct GuestSynchronousProxy { /* private fields */ }
Implementations§
Source§impl GuestSynchronousProxy
impl GuestSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<GuestEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<GuestEvent, 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 put_file(
&self,
local_file: ClientEnd<FileMarker>,
remote_path: &str,
___deadline: MonotonicInstant,
) -> Result<i32, Error>
pub fn put_file( &self, local_file: ClientEnd<FileMarker>, remote_path: &str, ___deadline: MonotonicInstant, ) -> Result<i32, Error>
Take a local file from the Fuchsia host and transfer it to a destination location on the guest under test.
Sourcepub fn get_file(
&self,
remote_path: &str,
local_file: ClientEnd<FileMarker>,
___deadline: MonotonicInstant,
) -> Result<i32, Error>
pub fn get_file( &self, remote_path: &str, local_file: ClientEnd<FileMarker>, ___deadline: MonotonicInstant, ) -> Result<i32, Error>
Pull a file from the guest under test and copy it to the specified location on the Fuchsia host.
Sourcepub fn execute_command(
&self,
command: &str,
env: &[EnvironmentVariable],
stdin: Option<Socket>,
stdout: Option<Socket>,
stderr: Option<Socket>,
command_listener: ServerEnd<CommandListenerMarker>,
) -> Result<(), Error>
pub fn execute_command( &self, command: &str, env: &[EnvironmentVariable], stdin: Option<Socket>, stdout: Option<Socket>, stderr: Option<Socket>, command_listener: ServerEnd<CommandListenerMarker>, ) -> Result<(), Error>
Execute command on the guest under test and return the resulting output, error, and return code.
Sourcepub fn shutdown(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn shutdown(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
Shuts down the guest and closes the channel over which Guest
is being
served.
Trait Implementations§
Source§impl Debug for GuestSynchronousProxy
impl Debug for GuestSynchronousProxy
Source§impl SynchronousProxy for GuestSynchronousProxy
impl SynchronousProxy for GuestSynchronousProxy
Source§type Proxy = GuestProxy
type Proxy = GuestProxy
The async proxy for the same protocol.
Source§type Protocol = GuestMarker
type Protocol = GuestMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for GuestSynchronousProxy
impl RefUnwindSafe for GuestSynchronousProxy
impl Send for GuestSynchronousProxy
impl Sync for GuestSynchronousProxy
impl Unpin for GuestSynchronousProxy
impl UnwindSafe for GuestSynchronousProxy
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
Mutably borrows from an owned value. Read more