Function netstring

Source
pub fn netstring(at: &[u8]) -> Result<(&[u8], &[u8]), String>
Expand description

Takes a netstring from the front of the slice.

Returns the unpacked netstring and the remainder of the slice.

NB: Netstring encoding is not included as a separate function because it is as simple as wite! (&mut buf, (payload.len()) ':' (payload) ',')?;.