Function capnp::serialize::try_read_message [−][src]
pub fn try_read_message<R>(
read: R,
options: ReaderOptions
) -> Result<Option<Reader<OwnedSegments>>> where
R: Read,
Like read_message(), but returns None instead of an error if there are zero bytes left in read
.
This is useful for reading a message stream of unknown length – you call this function
until it returns None.