Trait flep_protocol::argument::Argument [] [src]

pub trait Argument: Sized {
    fn read(read: &mut BufRead) -> Result<Self, Error>;
fn write(&self, write: &mut Write) -> Result<(), Error>; fn read_with_space(read: &mut BufRead) -> Result<Self, Error> { ... }
fn parse_text(text: &str) -> Self { ... }
fn bytes(&self) -> Vec<u8> { ... }
fn to_string(&self) -> String { ... } }

An argument to a command.

Required Methods

Provided Methods

Read an argument with a leading space character.

Most argument types don't care about leading spaces. These types can instead override read.

Implementors