pub enum TcpServerMessage {
Show 14 variants
Unauthenticated,
LoginOk {
token: SessionID,
},
LoginFailed {
reason: String,
},
ReloginOk {
token: SessionID,
},
ReloginFailed {
reason: String,
},
LogoutOk,
Kicked {
reason: String,
},
CommandOutput {
answer: (LogLevel, String),
response_id: u32,
},
ImplicitCommandOutput {
answer: CliActionResponse,
response_id: u32,
},
TopicUpdate {
data: TopicPayload,
},
EditGranted {
resource: EditableResource,
current_data: Vec<u8>,
},
EditDenied {
resource: EditableResource,
reason: String,
},
DropEditAck(EditableResource),
ShutdownAnnouncement,
}Expand description
Represents all valid messages dispatched from the kernel back to a connected client.
Variants§
Unauthenticated
Emitted when a client attempts an action before authenticating.
LoginOk
Indicates a successful login, providing the session token (for reconnecting later).
LoginFailed
Indicates a failed login attempt with the given reason.
ReloginOk
Indicates a successful session resumption.
ReloginFailed
Indicates a failed session resumption.
LogoutOk
Confirms the session has been terminated.
Kicked
Informs the client that the server forcibly closed the connection.
CommandOutput
Contains the text and log level output of a standard string command execution.
ImplicitCommandOutput
Contains the structured response of an implicit (pre-parsed) command execution.
TopicUpdate
Broadcasts new state data for a subscribed topic.
Fields
data: TopicPayloadEditGranted
Grants the client exclusive edit access to a resource, providing its current state.
EditDenied
Denies an edit request because the resource is already locked or unavailable.
DropEditAck(EditableResource)
Acknowledges, that the Resource-Lock has been dropped, and can be picked up by other clients
ShutdownAnnouncement
Notifies all clients that the server is gracefully shutting down.
Trait Implementations§
Source§impl Clone for TcpServerMessage
impl Clone for TcpServerMessage
Source§fn clone(&self) -> TcpServerMessage
fn clone(&self) -> TcpServerMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more