pub struct UserAgentInfo {
pub category: String,
pub browser_name: String,
pub browser_version: String,
pub metrics_browser: String,
pub metrics_os: String,
pub os_version: String,
pub os: String,
/* private fields */
}Fields§
§category: String§browser_name: String§browser_version: String§metrics_browser: String§metrics_os: String§os_version: String§os: StringTrait Implementations§
Source§impl Debug for UserAgentInfo
impl Debug for UserAgentInfo
Source§impl Default for UserAgentInfo
impl Default for UserAgentInfo
Source§fn default() -> Self
fn default() -> Self
Used when a request carries no User-Agent header at all.
The raw fields stay empty so logs can tell a missing header from an
unparsable one, but the metrics_* fields take the same
[UA_METRIC_UNKNOWN] bucket an unparsable header gets, to avoid
sending empty tags to metrics backend.
Source§impl From<&HttpRequest> for UserAgentInfo
impl From<&HttpRequest> for UserAgentInfo
Source§fn from(req: &HttpRequest) -> UserAgentInfo
fn from(req: &HttpRequest) -> UserAgentInfo
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UserAgentInfo
impl RefUnwindSafe for UserAgentInfo
impl Send for UserAgentInfo
impl Sync for UserAgentInfo
impl Unpin for UserAgentInfo
impl UnsafeUnpin for UserAgentInfo
impl UnwindSafe for UserAgentInfo
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].