pub enum Command {
Show 21 variants
Add {
path: PathBuf,
},
Remove,
Clear,
Dedup,
Save {
name: String,
},
Load {
name: String,
},
Shuffle,
Repeat {
mode: Option<RepeatModeArg>,
},
Goto {
path: PathBuf,
},
Search {
term: String,
},
Home,
Play,
Pause,
Stop,
Next,
Prev,
Seek {
position: Duration,
},
Vis,
Volume {
level: Option<u32>,
},
Help,
Quit,
}Expand description
Parsed slash command.
Variants§
Add
Remove
Clear
Dedup
Save
Load
Shuffle
Repeat
Fields
§
mode: Option<RepeatModeArg>Goto
Search
Home
Play
Pause
Stop
Next
Prev
Seek
Vis
Volume
Help
Quit
Implementations§
Source§impl Command
impl Command
Sourcepub fn parse(input: &str) -> Result<Self, CommandError>
pub fn parse(input: &str) -> Result<Self, CommandError>
Parses a command string (without the leading /).
@param input - The command string to parse
@returns The parsed command or an error
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Returns a brief description of the command for help text.
Trait Implementations§
impl StructuralPartialEq for Command
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
Mutably borrows from an owned value. Read more