pub fn decode_prefix<V: Source + Sink>(
ast: &Ast,
request: &ProbeRequest,
bytes: &[u8],
) -> Result<(V, usize), ProbeError>Expand description
Read one value of request.type_name from the start of bytes and say
how many octets it took.
decode reads a whole payload and refuses octets left behind it. A
transport that packs several serialized samples into one buffer without a
length for each (DDS-XRCE 1.0 Annex A sequence<SampleData>) has only the
type to tell where one sample ends and the next begins: this reads the
first and returns where it stopped. The octets after it are not looked at.
The payload is read without an encapsulation header (Emit::Payload),
from alignment origin 0.
ยงErrors
ProbeError, as decode; Unsupported for any emit but
Emit::Payload.