/// Writes segments as if they were a Capnproto message.
Writes segments as if they were a Capnproto message.
Writes segments as if they were a Capnproto message .
pub async fn write_message_segments<W>(mut write: &mut W, segments: &Vec<Vec<Word>>) where W: AsyncWrite + Unpin {
        let borrowed_segments: &[&[Word]] = &segments.iter()
            .map(|segment| &segment[..])
            .collect::<Vec<_>>()[..];
        write_segment_table(&mut write, borrowed_segments).await.unwrap();
        write_segments(write, borrowed_segments).await.unwrap();
    }
pub async fn write_message_segments < W > ( mut write : & mut W , segments : & Vec < Vec < Word > > ) where W : AsyncWrite + Unpin { let borrowed_segments : & [ & [ Word ] ] = & segments . iter ( ) . map ( | segment | & segment [ .. ] ) . collect :: < Vec < _ > > ( ) [ .. ] ; write_segment_table ( & mut write , borrowed_segments ) . await . unwrap ( ) ; write_segments ( write , borrowed_segments ) . await . unwrap ( ) ; }
Writes segments as if they were a Capnproto message.
Writes segments as if they were a Capnproto message .
write
&mut W
segments
&Vec<Vec<Word>>