Struct xray_lite::Request

source ·
pub struct Request {
    pub method: Option<String>,
    pub url: Option<String>,
    pub client_ip: Option<String>,
    pub user_agent: Option<String>,
    pub x_forwarded_for: Option<String>,
    pub traced: Option<bool>,
}
Expand description

Information about a request.

Fields§

§method: Option<String>

The request method. For example, GET.

§url: Option<String>

The full URL of the request, compiled from the protocol, hostname, and path of the request.

§client_ip: Option<String>

The IP address of the requester. Can be retrieved from the IP packet’s Source Address or, for forwarded requests, from an X-Forwarded-For header.

§user_agent: Option<String>

The user agent string from the requester’s client.

§x_forwarded_for: Option<String>

(segments only) boolean indicating that the client_ip was read from an X-Forwarded-For header and is not reliable as it could have been forged.

§traced: Option<bool>

(subsegments only) boolean indicating that the downstream call is to another traced service. If this field is set to true, X-Ray considers the trace to be broken until the downstream service uploads a segment with a parent_id that matches the id of the subsegment that contains this block.

Trait Implementations§

source§

impl Debug for Request

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Request

source§

fn default() -> Request

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Request

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Request

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V

source§

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