pub struct Md5Signer<'s> {
pub query_key: &'s str,
pub prefix_salt: Option<&'s str>,
pub suffix_salt: Option<&'s str>,
}Expand description
Helper for query string signing: MD5.
Fields§
§query_key: &'s strThe query param key.
The default is "sign".
prefix_salt: Option<&'s str>The salt to be used for signing (prefix).
suffix_salt: Option<&'s str>The salt to be used for signing (suffix).
Implementations§
Source§impl<'s> Md5Signer<'s>
impl<'s> Md5Signer<'s>
Sourcepub const fn new(
query_key: &'s str,
prefix_salt: Option<&'s str>,
suffix_salt: Option<&'s str>,
) -> Self
pub const fn new( query_key: &'s str, prefix_salt: Option<&'s str>, suffix_salt: Option<&'s str>, ) -> Self
Create a new MD5 signer.
Sourcepub const fn new_default() -> Self
pub const fn new_default() -> Self
Create a new MD5 signer with the default query key.
Sourcepub const fn with_query_key(self, query_key: &'s str) -> Self
pub const fn with_query_key(self, query_key: &'s str) -> Self
Set the query key.
Sourcepub const fn with_prefix_salt(self, prefix_salt: Option<&'s str>) -> Self
pub const fn with_prefix_salt(self, prefix_salt: Option<&'s str>) -> Self
Add a prefix salt to the signer.
Sourcepub const fn with_suffix_salt(self, suffix_salt: Option<&'s str>) -> Self
pub const fn with_suffix_salt(self, suffix_salt: Option<&'s str>) -> Self
Add a suffix salt to the signer.
Trait Implementations§
impl<'s> Copy for Md5Signer<'s>
Auto Trait Implementations§
impl<'s> Freeze for Md5Signer<'s>
impl<'s> RefUnwindSafe for Md5Signer<'s>
impl<'s> Send for Md5Signer<'s>
impl<'s> Sync for Md5Signer<'s>
impl<'s> Unpin for Md5Signer<'s>
impl<'s> UnwindSafe for Md5Signer<'s>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more