[][src]Struct mpd_protocol::command::CommandBuilder

pub struct CommandBuilder(_, _);

Builder for Commands.

Methods

impl CommandBuilder[src]

pub fn argument(self, argument: impl Into<String>) -> Self[src]

Add an argument to the last command.

The argument is automatically escaped and quoted if necessary, but you if you want to include nested data containing special characters (e.g. filter expressions), you may need to pre-escape them using escape_argument.

pub fn command(self, command: impl Into<String>) -> Self[src]

Add another command, starting a command list.

pub fn finish(self) -> Result<Command, CommandError>[src]

Complete the command, validating all entered components.

use mpd_protocol::Command;

let c = Command::build("status");

assert_eq!(
    c.finish().unwrap().render(),
    "status\n"
);

pub fn unwrap(self) -> Command[src]

Finish the command, panicking when invalid.

Trait Implementations

impl Clone for CommandBuilder[src]

impl Debug for CommandBuilder[src]

impl Eq for CommandBuilder[src]

impl Hash for CommandBuilder[src]

impl PartialEq<CommandBuilder> for CommandBuilder[src]

impl StructuralEq for CommandBuilder[src]

impl StructuralPartialEq for CommandBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.