Struct sentry_types::Auth
source · [−]pub struct Auth { /* private fields */ }
Expand description
Represents an auth header.
Implementations
sourceimpl Auth
impl Auth
sourcepub fn from_pairs<'a, I, K, V>(pairs: I) -> Result<Auth, ParseAuthError> where
I: IntoIterator<Item = (K, V)>,
K: AsRef<str>,
V: Into<Cow<'a, str>>,
pub fn from_pairs<'a, I, K, V>(pairs: I) -> Result<Auth, ParseAuthError> where
I: IntoIterator<Item = (K, V)>,
K: AsRef<str>,
V: Into<Cow<'a, str>>,
Creates an auth header from key value pairs.
sourcepub 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.
sourcepub fn timestamp(&self) -> Option<SystemTime>
pub fn timestamp(&self) -> Option<SystemTime>
Returns the timestamp the client defined
sourcepub fn public_key(&self) -> &str
pub fn public_key(&self) -> &str
Returns the public key
sourcepub fn secret_key(&self) -> Option<&str>
pub fn secret_key(&self) -> Option<&str>
Returns the client’s secret if it authenticated with a secret.
sourcepub fn is_public(&self) -> bool
pub fn is_public(&self) -> bool
Returns true if the authentication implies public auth (no secret)
sourcepub fn client_agent(&self) -> Option<&str>
pub fn client_agent(&self) -> Option<&str>
Returns the client’s agent
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Auth
impl<'de> Deserialize<'de> for Auth
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl FromStr for Auth
impl FromStr for Auth
type Err = ParseAuthError
type Err = ParseAuthError
The associated error which can be returned from parsing.
Auto Trait Implementations
impl RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl UnwindSafe for Auth
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more