#[non_exhaustive]pub enum ServerCommand {
Show 15 variants
SetClientVolume {
client_id: String,
volume: u16,
muted: bool,
},
SetClientLatency {
client_id: String,
latency: i32,
},
SetClientName {
client_id: String,
name: String,
},
SetGroupStream {
group_id: String,
stream_id: String,
},
SetGroupMute {
group_id: String,
muted: bool,
},
SetGroupName {
group_id: String,
name: String,
},
SetGroupClients {
group_id: String,
clients: Vec<String>,
},
DeleteClient {
client_id: String,
},
SetStreamMeta {
stream_id: String,
metadata: HashMap<String, Value>,
},
AddStream {
uri: String,
response_tx: Sender<Result<String, String>>,
},
RemoveStream {
stream_id: String,
},
StreamControl {
stream_id: String,
command: String,
params: Value,
},
GetStatus {
response_tx: Sender<ServerStatus>,
},
SendToClient {
client_id: String,
message: CustomMessage,
},
Stop,
}Expand description
Commands the consumer sends to the server.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SetClientVolume
Set a client’s volume.
SetClientLatency
Set a client’s latency offset.
SetClientName
Set a client’s display name.
SetGroupStream
Assign a stream to a group.
SetGroupMute
Mute/unmute a group.
SetGroupName
Set a group’s display name.
SetGroupClients
Move clients to a group.
DeleteClient
Delete a client from the server.
SetStreamMeta
Set stream metadata (artist, title, album, etc.).
AddStream
Dynamically add a stream source.
Fields
RemoveStream
Remove a stream source.
StreamControl
Forward a control command to a stream (play, pause, next, etc.).
Fields
GetStatus
Get full server status.
Fields
§
response_tx: Sender<ServerStatus>Response channel.
SendToClient
Send a custom binary protocol message to a streaming client.
Stop
Stop the server gracefully.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServerCommand
impl !RefUnwindSafe for ServerCommand
impl Send for ServerCommand
impl Sync for ServerCommand
impl Unpin for ServerCommand
impl UnsafeUnpin for ServerCommand
impl !UnwindSafe for ServerCommand
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
Mutably borrows from an owned value. Read more