Enum sshx_server::web::protocol::WsClient
source · pub enum WsClient {
Authenticate(Bytes),
SetName(String),
SetCursor(Option<(i32, i32)>),
SetFocus(Option<Sid>),
Create(i32, i32),
Close(Sid),
Move(Sid, Option<WsWinsize>),
Data(Sid, Bytes, u64),
Subscribe(Sid, u64),
Chat(String),
Ping(u64),
}
Expand description
A real-time message sent from the client over WebSocket.
Variants§
Authenticate(Bytes)
Authenticate the user’s encryption key by zeros block.
SetName(String)
Set the name of the current user.
SetCursor(Option<(i32, i32)>)
Send real-time information about the user’s cursor.
SetFocus(Option<Sid>)
Set the currently focused shell.
Create(i32, i32)
Create a new shell.
Close(Sid)
Close a specific shell.
Move(Sid, Option<WsWinsize>)
Move a shell window to a new position and focus it.
Data(Sid, Bytes, u64)
Add user data to a given shell.
Subscribe(Sid, u64)
Subscribe to a shell, starting at a given chunk index.
Chat(String)
Send a a chat message to the room.
Ping(u64)
Send a ping to the server, for latency measurement.
Trait Implementations§
source§impl<'de> Deserialize<'de> for WsClient
impl<'de> Deserialize<'de> for WsClient
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 WsClient
impl RefUnwindSafe for WsClient
impl Send for WsClient
impl Sync for WsClient
impl Unpin for WsClient
impl UnwindSafe for WsClient
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request