Trait octseq::builder::Truncate

source ·
pub trait Truncate {
    // Required method
    fn truncate(&mut self, len: usize);
}
Expand description

An octet sequence that can be shortened.

Required Methods§

source

fn truncate(&mut self, len: usize)

Truncate the sequence to len octets.

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

Implementations on Foreign Types§

source§

impl Truncate for Bytes

source§

fn truncate(&mut self, len: usize)

source§

impl Truncate for BytesMut

source§

fn truncate(&mut self, len: usize)

source§

impl Truncate for Vec<u8>

source§

fn truncate(&mut self, len: usize)

source§

impl<'a> Truncate for &'a [u8]

source§

fn truncate(&mut self, len: usize)

source§

impl<'a> Truncate for Cow<'a, [u8]>

source§

fn truncate(&mut self, len: usize)

source§

impl<'a, T: Truncate> Truncate for &'a mut T

source§

fn truncate(&mut self, len: usize)

source§

impl<A: Array<Item = u8>> Truncate for SmallVec<A>

source§

fn truncate(&mut self, len: usize)

Implementors§

source§

impl<const N: usize> Truncate for Array<N>