pub enum Message {
    Exit {
        channel_id: u32,
        code: u32,
        signal: u32,
    },
    Error {
        channel_id: u32,
        message: String,
    },
    Kill {
        channel_id: u32,
        signal: Option<u32>,
    },
    List {
        channel_id: u32,
        process_list: Option<HashMap<u32, (String, u32)>>,
    },
    Pid {
        channel_id: u32,
        pid: u32,
    },
    Spawn {
        channel_id: u32,
        command: String,
        args: Option<Vec<String>>,
    },
    Stdout {
        channel_id: u32,
        data: Option<String>,
    },
    Stderr {
        channel_id: u32,
        data: Option<String>,
    },
    Stdin {
        channel_id: u32,
        data: Option<String>,
    },
}
Expand description

Messages available in shell protocol

Variants

Exit

Fields

channel_id: u32

Channel ID of shell session

code: u32

Exit code

signal: u32

Exit signal

This message is sent by the shell service when a process exits

Error

Fields

channel_id: u32

Channel ID of shell session

message: String

Error condition encountered

This message is sent when an error occurs within the shell protocol

Kill

Fields

channel_id: u32

Channel ID of shell session

signal: Option<u32>

Optional signal to use. Default is SIGKILL

This message is sent to the shell service to send a kill signal to the child process

List

Fields

channel_id: u32

Channel ID of shell session

process_list: Option<HashMap<u32, (String, u32)>>

Optional list of processes. No list is sent when a request is sent.

This message is used to request and respond with the lists of processes currently running under the shell service.

Pid

Fields

channel_id: u32

Channel ID of shell session

pid: u32

PID of remote process

This message is sent by the shell service after a process is spawned to indicate the process’ PID

Spawn

Fields

channel_id: u32

Channel ID of shell session

command: String

Process command to spawn

args: Option<Vec<String>>

Optional arguments to pass into command when spawning

This message is sent to the shell service to request a child process to be spawned.

Stdout

Fields

channel_id: u32

Channel ID of shell session

data: Option<String>

Optional stdout data

This message is sent by the shell service when a process has produced stdout data. The shell service will send this message with no data when the stdout pipe is closed.

Stderr

Fields

channel_id: u32

Channel ID of shell session

data: Option<String>

Optional stdout data

This message is sent by the shell service when a process has produced stderr data. The shell service will send this message with no data when the stderr pipe is closed.

Stdin

Fields

channel_id: u32

Channel ID of shell session

data: Option<String>

Optional stdin data

This message is sent by the shell client with stdin for a shell process. If sent without any data the shell service will close the stdin pipe.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.