pub trait Command {
const CMD_NAME: &'static [u8];
fn into_vec(self) -> Result<Bytes, CommandError>;
fn try_parse(buf: &[u8]) -> Result<Self, CommandError>
where
Self: Sized;
}
Expand description
Trait used to implement a common interface for implementing new commands
Required Associated Constants
Required Methods
sourcefn into_vec(self) -> Result<Bytes, CommandError>
fn into_vec(self) -> Result<Bytes, CommandError>
Encodes the command into bytes