Skip to main content

TcpClientMessage

Enum TcpClientMessage 

Source
pub enum TcpClientMessage {
    Login {
        password: String,
        user_name: String,
        user_role: UserRole,
    },
    Logout,
    Relogin {
        user_id: SessionID,
        clear_subscriptions: bool,
    },
    Subscribe {
        topic: SubscribeTopic,
        update_mode: UpdateMode,
    },
    Unsubscribe {
        topic: SubscribeTopic,
    },
    ExecuteCommand {
        command: String,
        response_id: u32,
    },
    ExecuteImplicitCommand {
        command: CliAction,
        response_id: u32,
    },
    RequestEdit(EditableResource),
    SubmitEdit {
        resource: EditableResource,
        new_data: Vec<u8>,
    },
    DropEditLock(EditableResource),
}
Expand description

Represents all valid messages dispatched from a client to the kernel over an active TCP connection.

Variants§

§

Login

Request to authenticate a new session.

Fields

§password: String
§user_name: String
§user_role: UserRole
§

Logout

Request to safely terminate the current session.

§

Relogin

Request to resume a previous session using an existing token.

Fields

§user_id: SessionID
§clear_subscriptions: bool
§

Subscribe

Request to listen for state changes on a specific topic.

Fields

§update_mode: UpdateMode
§

Unsubscribe

Request to stop receiving updates for a specific topic.

Fields

§

ExecuteCommand

Submits a raw CLI string for the server to parse and execute.

Fields

§command: String
§response_id: u32
§

ExecuteImplicitCommand

Submits a pre-parsed, structured CLI action directly.

Fields

§command: CliAction
§response_id: u32
§

RequestEdit(EditableResource)

Requests exclusive editing rights for a specific engine resource.

§

SubmitEdit

Submits modifications for an exclusively locked resource.

Fields

§new_data: Vec<u8>
§

DropEditLock(EditableResource)

Drops the Lock on an exclusively locked resource, giving other Clients the chance to lock it.

Trait Implementations§

Source§

impl Debug for TcpClientMessage

Source§

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

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

impl<'de> Deserialize<'de> for TcpClientMessage

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 TcpClientMessage

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> 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, 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.