[−][src]Struct harsh::HarshBuilder
A builder used to configure and create a Harsh instance.
Methods
impl HarshBuilder
[src]
pub fn new() -> HarshBuilder
[src]
Creates a new HarshBuilder
instance.
pub fn salt<T: Into<Vec<u8>>>(self, salt: T) -> HarshBuilder
[src]
Provides a salt.
Note that this salt will be converted into a [u8]
before use, meaning
that multi-byte utf8 character values should be avoided.
pub fn alphabet<T: Into<Vec<u8>>>(self, alphabet: T) -> HarshBuilder
[src]
Provides an alphabet.
Note that this alphabet will be converted into a [u8]
before use, meaning
that multi-byte utf8 character values should be avoided.
pub fn separators<T: Into<Vec<u8>>>(self, separators: T) -> HarshBuilder
[src]
Provides a set of separators.
Note that these separators will be converted into a [u8]
before use,
meaning that multi-byte utf8 character values should be avoided.
pub fn length(self, hash_length: usize) -> HarshBuilder
[src]
Provides a minimum hash length.
Keep in mind that hashes produced may be longer than this length.
pub fn init(self) -> Result<Harsh>
[src]
Initializes a new Harsh
based on the HarshBuilder
.
This method will consume the HarshBuilder
.
Trait Implementations
Auto Trait Implementations
impl Send for HarshBuilder
impl Sync for HarshBuilder
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,