Function capnp_futures::serialize::try_read_message [−][src]
pub async fn try_read_message<R>(
reader: R,
options: ReaderOptions
) -> Result<Option<Reader<OwnedSegments>>> where
R: AsyncRead + Unpin,
Begins an asynchronous read of a message from reader
. Returns None
if
reader
has zero bytes left (i.e. is at end-of-file). To read a stream
containing an unknown number of messages, you could call this function
repeatedly until it returns None
.