Skip to main content

TcpServerMessage

Enum TcpServerMessage 

Source
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).

Fields

§

LoginFailed

Indicates a failed login attempt with the given reason.

Fields

§reason: String
§

ReloginOk

Indicates a successful session resumption.

Fields

§

ReloginFailed

Indicates a failed session resumption.

Fields

§reason: String
§

LogoutOk

Confirms the session has been terminated.

§

Kicked

Informs the client that the server forcibly closed the connection.

Fields

§reason: String
§

CommandOutput

Contains the text and log level output of a standard string command execution.

Fields

§answer: (LogLevel, String)
§response_id: u32
§

ImplicitCommandOutput

Contains the structured response of an implicit (pre-parsed) command execution.

Fields

§response_id: u32
§

TopicUpdate

Broadcasts new state data for a subscribed topic.

Fields

§

EditGranted

Grants the client exclusive edit access to a resource, providing its current state.

Fields

§current_data: Vec<u8>
§

EditDenied

Denies an edit request because the resource is already locked or unavailable.

Fields

§reason: String
§

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

Source§

fn clone(&self) -> TcpServerMessage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TcpServerMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TcpServerMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TcpServerMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.