Trait il2_iltags::tags::serialization::ByteArraySerializer[][src]

pub trait ByteArraySerializer {
    fn serialize_bytes(&mut self, buff: &[u8]) -> Result<()>;

    fn serialize_byte_vec(&mut self, vec: &Vec<u8>) -> Result<()> { ... }
}
Expand description

This trait adds the ability to serialize byte arrays.

Since 1.2.0.

Required methods

Serializes a byte array as a slice.

Arguments:

  • value: The value to write;

Returns:

  • Ok(()): For success;
  • Err(_): For failure;

Provided methods

👎 Deprecated

Serializes a byte array as a vector.

This method has been deprecated because because it is equivalent to ByteArraySerializer::serialize_bytes().

Arguments:

  • value: The value to write;

Returns:

  • Ok(()): For success;
  • Err(_): For failure;

Implementors