#[non_exhaustive]pub struct ApiKit {
pub path_params: Option<Constructor>,
pub query_params: Option<Constructor>,
pub json_body: Option<Constructor>,
pub url_encoded_body: Option<Constructor>,
pub buffered_body: Option<Constructor>,
pub body_size_limit: Option<Constructor>,
pub server_request_id: Option<Constructor>,
}
Expand description
A collection of first-party constructors that are often needed when building APIs.
§Guide
Check out the “Kits” section of Pavex’s guide for a thorough introduction to kits and how to customize them.
§Example
use pavex::blueprint::Blueprint;
use pavex::kit::ApiKit;
let mut bp = Blueprint::new();
let kit = ApiKit::new().register(&mut bp);
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.path_params: Option<Constructor>
The default constructor
for PathParams
.
query_params: Option<Constructor>
The default constructor
for QueryParams
.
json_body: Option<Constructor>
The default constructor for JsonBody
.
url_encoded_body: Option<Constructor>
The default constructor for UrlEncodedBody
.
buffered_body: Option<Constructor>
The default constructor for BufferedBody
.
body_size_limit: Option<Constructor>
The default constructor for BodySizeLimit
.
server_request_id: Option<Constructor>
The default constructor for ServerRequestId
.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApiKit
impl RefUnwindSafe for ApiKit
impl Send for ApiKit
impl Sync for ApiKit
impl Unpin for ApiKit
impl UnwindSafe for ApiKit
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)