[]Struct sentry::types::Auth

pub struct Auth { /* fields omitted */ }

Represents an auth header.

Implementations

impl Auth

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.

pub fn from_querystring(qs: &[u8]) -> Result<Auth, ParseAuthError>

Creates an auth header from a query string.

pub fn timestamp(&self) -> Option<DateTime<Utc>>

Returns the unix timestamp the client defined

pub fn version(&self) -> u16

Returns the protocol version the client speaks

pub fn public_key(&self) -> &str

Returns the public key

pub fn secret_key(&self) -> Option<&str>

Returns the client's secret if it authenticated with a secret.

pub fn is_public(&self) -> bool

Returns true if the authentication implies public auth (no secret)

pub fn client_agent(&self) -> Option<&str>

Returns the client's agent

Trait Implementations

impl Clone for Auth

impl Debug for Auth

impl<'de> Deserialize<'de> for Auth

impl Display for Auth

impl FromStr for Auth

type Err = ParseAuthError

The associated error which can be returned from parsing.

impl Serialize for Auth

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]