Enum sshx_server::web::protocol::WsServer
source · pub enum WsServer {
Hello(Uid, String),
InvalidAuth(),
Users(Vec<(Uid, WsUser)>),
UserDiff(Uid, Option<WsUser>),
Shells(Vec<(Sid, WsWinsize)>),
Chunks(Sid, u64, Vec<Bytes>),
Hear(Uid, String, String),
ShellLatency(u64),
Pong(u64),
Error(String),
}
Expand description
A real-time message sent from the server over WebSocket.
Variants§
Hello(Uid, String)
Initial server message, with the user’s ID and session metadata.
InvalidAuth()
The user’s authentication was invalid.
Users(Vec<(Uid, WsUser)>)
A snapshot of all current users in the session.
UserDiff(Uid, Option<WsUser>)
Info about a single user in the session: joined, left, or changed.
Shells(Vec<(Sid, WsWinsize)>)
Notification when the set of open shells has changed.
Chunks(Sid, u64, Vec<Bytes>)
Subscription results, in the form of terminal data chunks.
Hear(Uid, String, String)
Get a chat message tuple (uid, name, text)
from the room.
ShellLatency(u64)
Forward a latency measurement between the server and backend shell.
Pong(u64)
Echo back a timestamp, for the the client’s own latency measurement.
Error(String)
Alert the client of an application error.
Trait Implementations§
source§impl<'de> Deserialize<'de> for WsServer
impl<'de> Deserialize<'de> for WsServer
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 WsServer
impl RefUnwindSafe for WsServer
impl Send for WsServer
impl Sync for WsServer
impl Unpin for WsServer
impl UnwindSafe for WsServer
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