pub enum DebugRequest {
Execute {
args: Vec<String>,
stdout: Socket,
stderr: Socket,
responder: DebugExecuteResponder,
},
ListCommands {
responder: DebugListCommandsResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: DebugControlHandle,
method_type: MethodType,
},
}Expand description
Protocol for executing interactive driver debug commands.
Variants§
Execute
Executes a command with the provided argument vector.
The argument vector args is passed to the driver’s command handler
as-is, without in-flight modification. The argument vector follows
standard command-line conventions (analogous to argv), where the first
argument (args[0]) is typically the command or subcommand name,
followed by any flags or positional arguments.
Standard output and standard error from command execution are streamed
to the provided stdout and stderr sockets. The driver or command
handler writes to these sockets and closes them upon or before
returning the response.
Returns the command’s process exit code (exit_code), where 0
typically denotes success.
§Error
Returns a zx.Status error if the execution request itself fails:
ZX_ERR_INVALID_ARGS:argsis empty.ZX_ERR_NOT_FOUND: The requested command inargs[0]is unknown.
ListCommands
Lists all supported commands and their descriptions.
Fields
responder: DebugListCommandsResponder#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: DebugControlHandlemethod_type: MethodTypeImplementations§
Source§impl DebugRequest
impl DebugRequest
pub fn into_execute( self, ) -> Option<(Vec<String>, Socket, Socket, DebugExecuteResponder)>
pub fn into_list_commands(self) -> Option<DebugListCommandsResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL