Function binary_utils::write_bytes

source ·
pub async fn write_bytes(
    writer: &mut (impl AsyncWrite + Unpin),
    bytes: &[u8]
) -> Result<()>
Expand description

A function to asyncronously write data to the provided writer.

§Arguments

writer - A mutable reference to a type implementing AsyncWrite and Unpin bytes - A reference to a slice of bytes that gets written into the provided writer

§Returns

Returns Ok(()) or an error, if the write operation fails.