Struct argonautica::input::Password [−][src]
pub struct Password<'a> { /* fields omitted */ }
Type-safe struct representing the raw bytes of a password
Methods
impl<'a> Password<'a>
[src]
impl<'a> Password<'a>
pub fn as_bytes(&self) -> &[u8]
[src]
pub fn as_bytes(&self) -> &[u8]
Read-only access to the underlying byte buffer
pub fn is_mutable(&self) -> bool
[src]
pub fn is_mutable(&self) -> bool
Indicates whether the underlying byte buffer is mutable or not. The underlying byte
buffer is mutable when the Password
was constructed
from an owned value (such as a String
or a Vec<u8>
) or from a mutable reference
(such as a &mut str
or a &mut [u8]
). It is not mutable when the
Password
was constructed from an immutable reference
(such as a &str
or a &[u8]
). The Password
must be mutable
in order to hash or verify with the password_clearing
configuration set to true
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Read-only acccess to the underlying byte buffer's length (in number of bytes)
pub fn to_owned(&self) -> Password<'static>
[src]
pub fn to_owned(&self) -> Password<'static>
Clones the underlying byte buffer and returns a new
Password
with a static
lifetime. Use this method if you
would like to move a Password
to another thread
pub fn to_str(&self) -> Result<&str, Error>
[src]
pub fn to_str(&self) -> Result<&str, Error>
Read-only access to the underlying byte buffer as a &str
if its bytes are valid utf-8
Trait Implementations
impl<'a> From<&'a str> for Password<'a>
[src]
impl<'a> From<&'a str> for Password<'a>
impl<'a> From<&'a mut str> for Password<'a>
[src]
impl<'a> From<&'a mut str> for Password<'a>
impl<'a> From<&'a String> for Password<'a>
[src]
impl<'a> From<&'a String> for Password<'a>
impl<'a> From<&'a mut String> for Password<'a>
[src]
impl<'a> From<&'a mut String> for Password<'a>
impl<'a> From<String> for Password<'a>
[src]
impl<'a> From<String> for Password<'a>
impl<'a> From<&'a [u8]> for Password<'a>
[src]
impl<'a> From<&'a [u8]> for Password<'a>
impl<'a> From<&'a mut [u8]> for Password<'a>
[src]
impl<'a> From<&'a mut [u8]> for Password<'a>
impl<'a> From<&'a Vec<u8>> for Password<'a>
[src]
impl<'a> From<&'a Vec<u8>> for Password<'a>
impl<'a> From<&'a mut Vec<u8>> for Password<'a>
[src]
impl<'a> From<&'a mut Vec<u8>> for Password<'a>
impl<'a> From<Vec<u8>> for Password<'a>
[src]
impl<'a> From<Vec<u8>> for Password<'a>
impl<'a> From<&'a Password<'a>> for Password<'a>
[src]
impl<'a> From<&'a Password<'a>> for Password<'a>
impl<'a> From<&'a mut Password<'a>> for Password<'a>
[src]
impl<'a> From<&'a mut Password<'a>> for Password<'a>
impl<'a> Debug for Password<'a>
[src]
impl<'a> Debug for Password<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Eq for Password<'a>
[src]
impl<'a> Eq for Password<'a>
impl<'a> PartialEq for Password<'a>
[src]
impl<'a> PartialEq for Password<'a>
fn eq(&self, other: &Password<'a>) -> bool
[src]
fn eq(&self, other: &Password<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Password<'a>) -> bool
[src]
fn ne(&self, other: &Password<'a>) -> bool
This method tests for !=
.
impl<'a> Hash for Password<'a>
[src]
impl<'a> Hash for Password<'a>