Struct secstr::SecVec [] [src]

pub struct SecVec<T> where
    T: Sized + Copy
{ /* fields omitted */ }

A data type suitable for storing sensitive information such as passwords and private keys in memory, that implements:

Be careful with SecStr::from: if you have a borrowed string, it will be copied.
Use SecStr::new if you have a Vec<u8>.

Methods

impl<T> SecVec<T> where
    T: Sized + Copy
[src]

Borrow the contents of the string.

Mutably borrow the contents of the string.

Overwrite the string with zeros. This is automatically called in the destructor.

Trait Implementations

impl<T: Clone> Clone for SecVec<T> where
    T: Sized + Copy
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Eq> Eq for SecVec<T> where
    T: Sized + Copy
[src]

impl<T, U> From<U> for SecVec<T> where
    U: Into<Vec<T>>,
    T: Sized + Copy
[src]

Performs the conversion.

impl<T> Borrow<[T]> for SecVec<T> where
    T: Sized + Copy
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<[T]> for SecVec<T> where
    T: Sized + Copy
[src]

Mutably borrows from an owned value. Read more

impl<T> Drop for SecVec<T> where
    T: Sized + Copy
[src]

A method called when the value goes out of scope. Read more

impl<T> PartialEq for SecVec<T> where
    T: Sized + Copy
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T> Debug for SecVec<T> where
    T: Sized + Copy
[src]

Formats the value using the given formatter.

impl<T> Display for SecVec<T> where
    T: Sized + Copy
[src]

Formats the value using the given formatter. Read more