Struct relay_common::Auth
pub struct Auth { /* private fields */ }
Expand description
Represents an auth header.
Implementations§
§impl Auth
impl Auth
pub fn from_pairs<'a, I, K, V>(pairs: I) -> Result<Auth, ParseAuthError>
pub fn from_pairs<'a, I, K, V>(pairs: I) -> Result<Auth, ParseAuthError>
Creates an auth header from key value pairs.
pub fn from_querystring(qs: &[u8]) -> Result<Auth, ParseAuthError>
pub fn from_querystring(qs: &[u8]) -> Result<Auth, ParseAuthError>
Creates an auth header from a query string.
pub fn timestamp(&self) -> Option<SystemTime>
pub fn timestamp(&self) -> Option<SystemTime>
Returns the timestamp the client defined
pub fn public_key(&self) -> &str
pub fn public_key(&self) -> &str
Returns the public key
pub fn secret_key(&self) -> Option<&str>
pub fn secret_key(&self) -> Option<&str>
Returns the client’s secret if it authenticated with a secret.
pub fn client_agent(&self) -> Option<&str>
pub fn client_agent(&self) -> Option<&str>
Returns the client’s agent
Trait Implementations§
§impl<'de> Deserialize<'de> for Auth
impl<'de> Deserialize<'de> for Auth
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Auth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Auth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl FromStr for Auth
impl FromStr for Auth
§type Err = ParseAuthError
type Err = ParseAuthError
The associated error which can be returned from parsing.
§impl Serialize for Auth
impl Serialize for Auth
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Auth
impl RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl UnwindSafe for Auth
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)