pub struct Request {
pub id: Uuid,
pub operation: Operation,
pub path: String,
pub namespace: Vec<String>,
pub data: Bytes,
pub query_string: String,
pub extensions: Extensions,
pub params: Vec<String>,
pub token: Option<String>,
pub headers: HashMap<String, String>,
}Fields§
§id: Uuid§operation: Operation§path: String§namespace: Vec<String>§data: Bytes§query_string: String§extensions: Extensions§params: Vec<String>§token: Option<String>§headers: HashMap<String, String>Implementations§
Source§impl Request
impl Request
Sourcepub async fn new(raw: Request<Limited<Body>>) -> Result<Self, ApiError>
pub async fn new(raw: Request<Limited<Body>>) -> Result<Self, ApiError>
Create a internal logical request from a http request.
§Errors
Returns an error if the http request contains unsupported elements that cannot be converted to the logical request format.
pub fn operation(&self) -> Operation
pub fn advance_path(&mut self, prefix: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Request
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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