pub enum GuestRequest {
PutFile {
local_file: ClientEnd<FileMarker>,
remote_path: String,
responder: GuestPutFileResponder,
},
GetFile {
remote_path: String,
local_file: ClientEnd<FileMarker>,
responder: GuestGetFileResponder,
},
ExecuteCommand {
command: String,
env: Vec<EnvironmentVariable>,
stdin: Option<Socket>,
stdout: Option<Socket>,
stderr: Option<Socket>,
command_listener: ServerEnd<CommandListenerMarker>,
control_handle: GuestControlHandle,
},
Shutdown {
responder: GuestShutdownResponder,
},
}
Expand description
Guest
exposes methods for interacting with a virtualized guest.
A connection to Guest
provides access to a single virtualized guest.
The guest lifetime is bound to the connection; when the client handle
is dropped, the guest will be shutdown. NOTE however that this
shutdown-on-drop happens asynchronously; clients should always use
the synchronous method below to avoid flakes when running multiple
tests.
Variants§
PutFile
Take a local file from the Fuchsia host and transfer it to a destination location on the guest under test.
GetFile
Pull a file from the guest under test and copy it to the specified location on the Fuchsia host.
ExecuteCommand
Execute command on the guest under test and return the resulting output, error, and return code.
Shutdown
Shuts down the guest and closes the channel over which Guest
is being
served.
Fields
responder: GuestShutdownResponder
Implementations§
Source§impl GuestRequest
impl GuestRequest
pub fn into_put_file( self, ) -> Option<(ClientEnd<FileMarker>, String, GuestPutFileResponder)>
pub fn into_get_file( self, ) -> Option<(String, ClientEnd<FileMarker>, GuestGetFileResponder)>
pub fn into_execute_command( self, ) -> Option<(String, Vec<EnvironmentVariable>, Option<Socket>, Option<Socket>, Option<Socket>, ServerEnd<CommandListenerMarker>, GuestControlHandle)>
pub fn into_shutdown(self) -> Option<GuestShutdownResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL