Trait domain::base::octets::OctetsExt[][src]

pub trait OctetsExt: AsRef<[u8]> {
    fn truncate(&mut self, len: usize);
}

An extension trait for octet sequences.

This trait collects some additional functionality that is not available via the more general AsRef<[u8]>. Currently, that is only truncating the sequence to a given length.

Required methods

fn truncate(&mut self, len: usize)[src]

Truncate the sequence to len octets.

If len is larger than the length of the sequence, nothing happens.

Loading content...

Implementations on Foreign Types

impl<'a> OctetsExt for &'a [u8][src]

impl<'a> OctetsExt for Cow<'a, [u8]>[src]

impl OctetsExt for Vec<u8>[src]

impl OctetsExt for Bytes[src]

impl<A: Array<Item = u8>> OctetsExt for SmallVec<A>[src]

Loading content...

Implementors

Loading content...