Function nix_compat::wire::bytes::read_string

source ·
pub async fn read_string<R>(
    r: &mut R,
    allowed_size: RangeInclusive<usize>,
) -> Result<String>
where R: AsyncReadExt + Unpin,
Expand description

Read a “bytes wire packet” of from the AsyncRead and tries to parse as string. Internally uses read_bytes. Rejects reading more than allowed_size bytes of payload.