pub struct ApiRequest {Show 15 fields
pub action: Action,
pub ranges: HashMap<CompactString, Range>,
pub top_level_range: Range,
pub payload: Option<Payload>,
pub preferences: Preferences,
pub query_params: QueryParams,
pub columns: HashSet<CompactString>,
pub headers: Vec<(String, String)>,
pub cookies: Vec<(String, String)>,
pub path: String,
pub method: String,
pub schema: CompactString,
pub negotiated_by_profile: bool,
pub accept_media_types: Vec<MediaType>,
pub content_media_type: MediaType,
}Expand description
The core API request struct.
The core ApiRequest data type. Contains all parsed and
validated information from an HTTP request.
Fields§
§action: ActionThe resolved action to perform
ranges: HashMap<CompactString, Range>Ranges keyed by embed level (e.g., “limit” for top-level)
top_level_range: RangeThe top-level range for the main query
payload: Option<Payload>Parsed request body
preferences: PreferencesParsed Prefer headers
query_params: QueryParamsParsed query parameters
columns: HashSet<CompactString>Column names from payload or &columns parameter
headers: Vec<(String, String)>HTTP headers (lowercased name, value)
Request cookies
path: StringRaw request path
method: StringHTTP method
schema: CompactStringThe request schema (from profile headers or default)
negotiated_by_profile: boolWhether the schema was negotiated via profile headers
accept_media_types: Vec<MediaType>Accepted media types from Accept header (sorted by quality)
content_media_type: MediaTypeContent-Type of the request body
Trait Implementations§
Source§impl Clone for ApiRequest
impl Clone for ApiRequest
Source§fn clone(&self) -> ApiRequest
fn clone(&self) -> ApiRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ApiRequest
impl RefUnwindSafe for ApiRequest
impl Send for ApiRequest
impl Sync for ApiRequest
impl Unpin for ApiRequest
impl UnsafeUnpin for ApiRequest
impl UnwindSafe for ApiRequest
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