Struct password_hash::ParamsString [−][src]
pub struct ParamsString(_);
Algorithm parameter string.
The PHC string format specification defines a set of optional algorithm-specific name/value pairs which can be encoded into a PHC-formatted parameter string as follows:
$<param>=<value>(,<param>=<value>)*
This type represents that set of parameters.
Implementations
impl ParamsString
[src]
impl ParamsString
[src]pub fn new() -> Self
[src]
Create new empty ParamsString
.
pub fn add_str<'a>(
&mut self,
name: impl TryInto<Ident<'a>>,
value: impl TryInto<Value<'a>>
) -> Result<()>
[src]
&mut self,
name: impl TryInto<Ident<'a>>,
value: impl TryInto<Value<'a>>
) -> Result<()>
Add a key/value pair with a string value to the ParamsString
.
pub fn add_decimal<'a>(
&mut self,
name: impl TryInto<Ident<'a>>,
value: Decimal
) -> Result<()>
[src]
&mut self,
name: impl TryInto<Ident<'a>>,
value: Decimal
) -> Result<()>
Add a key/value pair with a decimal value to the ParamsString
.
pub fn as_bytes(&self) -> &[u8]
[src]
Borrow the contents of this ParamsString
as a byte slice.
pub fn as_str(&self) -> &str
[src]
Borrow the contents of this ParamsString
as a str
.
pub fn len(&self) -> usize
[src]
Get the count of the number ASCII characters in this ParamsString
.
pub fn is_empty(&self) -> bool
[src]
Is this set of parameters empty?
pub fn iter(&self) -> Iter<'_>
[src]
Iterate over the parameters.
pub fn get<'a>(&self, name: impl TryInto<Ident<'a>>) -> Option<Value<'_>>
[src]
Get a parameter Value
by name.
pub fn get_str<'a>(&self, name: impl TryInto<Ident<'a>>) -> Option<&str>
[src]
Get a parameter as a str
.
pub fn get_decimal<'a>(&self, name: impl TryInto<Ident<'a>>) -> Option<Decimal>
[src]
Get a parameter as a Decimal
.
See Value::decimal
for format information.
Trait Implementations
impl Clone for ParamsString
[src]
impl Clone for ParamsString
[src]fn clone(&self) -> ParamsString
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for ParamsString
[src]
impl Default for ParamsString
[src]fn default() -> ParamsString
[src]
impl Eq for ParamsString
[src]
impl Eq for ParamsString
[src]impl<'a> FromIterator<(Ident<'a>, Value<'a>)> for ParamsString
[src]
impl<'a> FromIterator<(Ident<'a>, Value<'a>)> for ParamsString
[src]impl FromStr for ParamsString
[src]
impl FromStr for ParamsString
[src]impl PartialEq<ParamsString> for ParamsString
[src]
impl PartialEq<ParamsString> for ParamsString
[src]fn eq(&self, other: &ParamsString) -> bool
[src]
fn ne(&self, other: &ParamsString) -> bool
[src]
impl StructuralEq for ParamsString
[src]
impl StructuralEq for ParamsString
[src]impl StructuralPartialEq for ParamsString
[src]
impl StructuralPartialEq for ParamsString
[src]Auto Trait Implementations
impl RefUnwindSafe for ParamsString
impl RefUnwindSafe for ParamsString
impl Send for ParamsString
impl Send for ParamsString
impl Sync for ParamsString
impl Sync for ParamsString
impl Unpin for ParamsString
impl Unpin for ParamsString
impl UnwindSafe for ParamsString
impl UnwindSafe for ParamsString