[][src]Struct seckey::SecBytes

pub struct SecBytes { /* fields omitted */ }

Implementations

impl SecBytes[src]

pub fn new(len: usize) -> SecBytes[src]

pub fn with<F>(len: usize, f: F) -> SecBytes where
    F: FnOnce(&mut [u8]), 
[src]

pub fn read(&self) -> SecReadGuard[src]

Borrow Read

use seckey::SecBytes;

let secpass = SecBytes::with(8, |buf| buf.copy_from_slice(&[8u8; 8][..]));
assert_eq!([8u8; 8], *secpass.read());

pub fn write(&mut self) -> SecWriteGuard[src]

Borrow Write

let mut wpass = secpass.write();
wpass[0] = 0;
assert_eq!([0, 8, 8, 8, 8, 8, 8, 8], *wpass);

Trait Implementations

impl Debug for SecBytes[src]

impl Drop for SecBytes[src]

impl Pointer for SecBytes[src]

impl Send for SecBytes[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.