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.
ChannelList
Response: CommandResponse::ChannelList.
ConfigReload
Force reloading of config file from disk. No response.
DeafenSelf(Option<bool>)
Response: CommandResponse::DeafenStatus. Toggles if None.
Events
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.
Ping
Response: CommandResponse::Pong. Used to test existance of a mumd-instance.
SendMessage
Send a message to some MessageTarget.
Fields
targets: MessageTarget
The target(s) to send the message to.
ServerConnect
Connect to the specified server. Response: CommandResponse::ServerConnect.
Fields
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.
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<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
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>,
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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