pub enum WsClientMessage {
Execute {
command: String,
timeout_secs: Option<u64>,
},
Ping,
Pong,
}Expand description
A message the server accepts from a WebSocket client.
Split from WsServerMessage because the two directions want opposite
strictness, and one shared type could only have one. Input is refused when
it carries a field this server does not know — timeoutSecs for
timeout_secs otherwise runs the command with no timeout at all and reports
timed_out: false, which reads as “finished within the limit”. Output stays
permissive, so a client built against an older version of this crate keeps
working when a later server adds a field.
Variants§
Execute
Run a command and stream its output back.
Ping
Connection health. The server answers Ping with Pong.
Pong
Trait Implementations§
Source§impl Clone for WsClientMessage
impl Clone for WsClientMessage
Source§fn clone(&self) -> WsClientMessage
fn clone(&self) -> WsClientMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WsClientMessage
impl Debug for WsClientMessage
Source§impl<'de> Deserialize<'de> for WsClientMessage
impl<'de> Deserialize<'de> for WsClientMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WsClientMessage
impl RefUnwindSafe for WsClientMessage
impl Send for WsClientMessage
impl Sync for WsClientMessage
impl Unpin for WsClientMessage
impl UnsafeUnpin for WsClientMessage
impl UnwindSafe for WsClientMessage
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