|
|
@ -270,15 +270,15 @@ pub enum RedrawEvent {
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum ChannelStreamType {
|
|
|
|
pub enum ChannelStreamType {
|
|
|
|
STDIO,
|
|
|
|
Stdio,
|
|
|
|
STDERR,
|
|
|
|
Stderr,
|
|
|
|
Socket,
|
|
|
|
Socket,
|
|
|
|
Job,
|
|
|
|
Job,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl Default for ChannelStreamType {
|
|
|
|
impl Default for ChannelStreamType {
|
|
|
|
fn default() -> Self {
|
|
|
|
fn default() -> Self {
|
|
|
|
Self::STDIO
|
|
|
|
Self::Stdio
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -286,7 +286,7 @@ impl Default for ChannelStreamType {
|
|
|
|
pub enum ChannelMode {
|
|
|
|
pub enum ChannelMode {
|
|
|
|
Bytes,
|
|
|
|
Bytes,
|
|
|
|
Terminal,
|
|
|
|
Terminal,
|
|
|
|
RPC,
|
|
|
|
Rpc,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl Default for ChannelMode {
|
|
|
|
impl Default for ChannelMode {
|
|
|
@ -307,7 +307,7 @@ pub struct ClientVersion {
|
|
|
|
#[derive(Debug)]
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum ClientType {
|
|
|
|
pub enum ClientType {
|
|
|
|
Remote,
|
|
|
|
Remote,
|
|
|
|
UI,
|
|
|
|
Ui,
|
|
|
|
Embedder,
|
|
|
|
Embedder,
|
|
|
|
Host,
|
|
|
|
Host,
|
|
|
|
Plugin,
|
|
|
|
Plugin,
|
|
|
@ -953,8 +953,8 @@ pub fn parse_redraw_event(event_value: Value) -> Result<Vec<RedrawEvent>> {
|
|
|
|
|
|
|
|
|
|
|
|
pub fn parse_channel_stream_type(channel_stream_value: Value) -> Result<ChannelStreamType> {
|
|
|
|
pub fn parse_channel_stream_type(channel_stream_value: Value) -> Result<ChannelStreamType> {
|
|
|
|
match parse_string(channel_stream_value)?.as_ref() {
|
|
|
|
match parse_string(channel_stream_value)?.as_ref() {
|
|
|
|
"stdio" => Ok(ChannelStreamType::STDIO),
|
|
|
|
"stdio" => Ok(ChannelStreamType::Stdio),
|
|
|
|
"stderr" => Ok(ChannelStreamType::STDERR),
|
|
|
|
"stderr" => Ok(ChannelStreamType::Stderr),
|
|
|
|
"socket" => Ok(ChannelStreamType::Socket),
|
|
|
|
"socket" => Ok(ChannelStreamType::Socket),
|
|
|
|
"job" => Ok(ChannelStreamType::Job),
|
|
|
|
"job" => Ok(ChannelStreamType::Job),
|
|
|
|
_ => Err(ParseError::InvalidFormat),
|
|
|
|
_ => Err(ParseError::InvalidFormat),
|
|
|
@ -965,7 +965,7 @@ pub fn parse_channel_mode(channel_mode_value: Value) -> Result<ChannelMode> {
|
|
|
|
match parse_string(channel_mode_value)?.as_ref() {
|
|
|
|
match parse_string(channel_mode_value)?.as_ref() {
|
|
|
|
"bytes" => Ok(ChannelMode::Bytes),
|
|
|
|
"bytes" => Ok(ChannelMode::Bytes),
|
|
|
|
"terminal" => Ok(ChannelMode::Terminal),
|
|
|
|
"terminal" => Ok(ChannelMode::Terminal),
|
|
|
|
"rpc" => Ok(ChannelMode::RPC),
|
|
|
|
"rpc" => Ok(ChannelMode::Rpc),
|
|
|
|
_ => Err(ParseError::InvalidFormat),
|
|
|
|
_ => Err(ParseError::InvalidFormat),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -996,7 +996,7 @@ pub fn parse_client_version(version_value: Value) -> Result<ClientVersion> {
|
|
|
|
pub fn parse_client_type(client_type_value: Value) -> Result<ClientType> {
|
|
|
|
pub fn parse_client_type(client_type_value: Value) -> Result<ClientType> {
|
|
|
|
match parse_string(client_type_value)?.as_ref() {
|
|
|
|
match parse_string(client_type_value)?.as_ref() {
|
|
|
|
"remote" => Ok(ClientType::Remote),
|
|
|
|
"remote" => Ok(ClientType::Remote),
|
|
|
|
"ui" => Ok(ClientType::UI),
|
|
|
|
"ui" => Ok(ClientType::Ui),
|
|
|
|
"embedder" => Ok(ClientType::Embedder),
|
|
|
|
"embedder" => Ok(ClientType::Embedder),
|
|
|
|
"host" => Ok(ClientType::Host),
|
|
|
|
"host" => Ok(ClientType::Host),
|
|
|
|
"plugin" => Ok(ClientType::Plugin),
|
|
|
|
"plugin" => Ok(ClientType::Plugin),
|
|
|
|