[−][src]Struct seckey::SecBytes
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]
F: FnOnce(&mut [u8]),
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
impl !RefUnwindSafe for SecBytes
impl !Sync for SecBytes
impl Unpin for SecBytes
impl UnwindSafe for SecBytes
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,