[][src]Function velocypack::first_from_bytes

pub fn first_from_bytes<'a, T: Deserialize<'a>>(
    s: &'a [u8]
) -> Result<(T, &'a [u8])>

Deserialize the first VelocyPack found in given bytes, and return it along with any remaining bytes. Typically used when dealing with VelocyStream, which packs either multiple VelocyPacks into bytes, or packs a VelocyPack header followed by other data into bytes.