[][src]Function gvariant::aligned_bytes::read_to_slice

pub fn read_to_slice<A: Alignment, R: Read>(
    r: R,
    size_hint: Option<usize>
) -> Result<Box<AlignedSlice<A>>>

Read the contents of the Read into an AlignedSlice

This can be considered equivalent to Read::read_to_end(), but for AlignedSlice rather than Vec.

If we know how much data there is to read (a common case) then setting size_hint will allow us to perform just a single allocation and no copying.