[−][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 RefUnwindSafe for HarshBuilder
impl Send for HarshBuilder
impl Sync for HarshBuilder
impl Unpin for HarshBuilder
impl UnwindSafe for HarshBuilder
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>,