Skip to main content

ResizableBytes

Trait ResizableBytes 

Source
pub trait ResizableBytes {
    // Required method
    fn resize(&mut self, new_len: usize, value: u8);
}
Expand description

A byte array which can be resized.

Required Methods§

Source

fn resize(&mut self, new_len: usize, value: u8)

Resizes self with new_len elements, populating new values with value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ResizableBytes for Vec<u8>

Source§

fn resize(&mut self, new_len: usize, value: u8)

Implementors§

Source§

impl ResizableBytes for HeapBytes

Available on crate feature protected only.
Source§

impl<A: Zeroize + NewBytes + ResizableBytes + Lockable<A>> ResizableBytes for Protected<A, ReadWrite, Locked>

Available on crate feature protected only.
Source§

impl<A: Zeroize + NewBytes + ResizableBytes + Lockable<A>> ResizableBytes for Protected<A, ReadWrite, Unlocked>

Available on crate feature protected only.