parse_command

Function parse_command 

Source
pub fn parse_command(buf: &mut BytesMut) -> CacheResult<Vec<String>>
Expand description

Parse a buffer into command parts with validation.

Returns an error if the buffer is empty or malformed.

§Arguments

  • buf - The buffer to parse. Will be consumed.

§Returns

A vector of at least one string, or an error.