Enum Command

Source
pub enum Command {
Show 17 variants ChannelJoin { channel_identifier: String, }, ChannelList, ConfigReload, DeafenSelf(Option<bool>), Events { block: bool, }, InputVolumeSet(f32), MuteOther(String, Option<bool>), MuteSelf(Option<bool>), OutputVolumeSet(f32), PastMessages { block: bool, }, Ping, SendMessage { message: String, targets: MessageTarget, }, ServerConnect { host: String, port: u16, username: String, password: Option<String>, accept_invalid_cert: bool, }, ServerDisconnect, ServerStatus { host: String, port: u16, }, Status, UserVolumeSet(String, f32),
}
Expand description

Sent by a controller to mumd who might respond with a CommandResponse. Not all commands receive a response.

Variants§

§

ChannelJoin

No response.

Fields

§channel_identifier: String
§

ChannelList

§

ConfigReload

Force reloading of config file from disk. No response.

§

DeafenSelf(Option<bool>)

Response: CommandResponse::DeafenStatus. Toggles if None.

§

Events

Fields

§block: bool
§

InputVolumeSet(f32)

Set the outgoing audio volume (i.e. from you to the server). No response.

§

MuteOther(String, Option<bool>)

Response: CommandResponse::MuteStatus. Toggles mute state if None.

§

MuteSelf(Option<bool>)

Response: CommandResponse::MuteStatus. Toggles mute state if None.

§

OutputVolumeSet(f32)

Set the master incoming audio volume (i.e. from the server to you). No response.

§

PastMessages

Request a list of past messages. Blocks while waiting for more messages if block is true. Response: multiple CommandResponse::PastMessage.

Fields

§block: bool
§

Ping

Response: CommandResponse::Pong. Used to test existance of a mumd-instance.

§

SendMessage

Send a message to some MessageTarget.

Fields

§message: String

The message to send.

§targets: MessageTarget

The target(s) to send the message to.

§

ServerConnect

Connect to the specified server. Response: CommandResponse::ServerConnect.

Fields

§host: String

The URL or IP-adress to connect to.

§port: u16

The port to connect to.

§username: String

The username to connect with.

§password: Option<String>

The server password, if applicable. Not sent if None.

§accept_invalid_cert: bool

Whether to accept an invalid server certificate or not.

§

ServerDisconnect

Disconnect from the currently connected server. No response.

§

ServerStatus

Send a server status request via UDP (e.g. not requiring a TCP connection). Response: CommandResponse::ServerStatus.

Fields

§host: String
§port: u16
§

Status

Request the status of the current server. Response: CommandResponse::Status.

§

UserVolumeSet(String, f32)

The the volume of the specified user. No response.

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Command

Source§

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

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

impl<'de> Deserialize<'de> for Command

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 Command

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.
Source§

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