[][src]Trait noise_protocol::U8Array

pub trait U8Array: Sized {
    fn new() -> Self;
fn new_with(_: u8) -> Self;
fn from_slice(_: &[u8]) -> Self;
fn len() -> usize;
fn as_slice(&self) -> &[u8];
fn as_mut(&mut self) -> &mut [u8]; fn clone(&self) -> Self { ... } }

A trait for fixed size u8 array.

Required methods

fn new() -> Self

Create a new array filled with all zeros.

fn new_with(_: u8) -> Self

Create a new array filled with a same value.

fn from_slice(_: &[u8]) -> Self

Create a new array from a slice.

Panics

The slice must be of the same length.

fn len() -> usize

Length of the array.

fn as_slice(&self) -> &[u8]

As slice.

fn as_mut(&mut self) -> &mut [u8]

As mutable slice.

Loading content...

Provided methods

fn clone(&self) -> Self

Clone.

Loading content...

Implementations on Foreign Types

impl U8Array for [u8; 32][src]

fn clone(&self) -> Self[src]

impl U8Array for [u8; 64][src]

fn clone(&self) -> Self[src]

impl U8Array for [u8; 128][src]

fn clone(&self) -> Self[src]

Loading content...

Implementors

Loading content...