pub struct FirePitApi { /* private fields */ }Available on crate features
testing only.Implementations§
Source§impl FirePitApi
impl FirePitApi
pub fn new(inner: FirePit) -> Self
pub fn data(&self) -> &Resources
Sourcepub async fn route(&self, req: &mut Request) -> Option<Result<Response, Error>>
pub async fn route(&self, req: &mut Request) -> Option<Result<Response, Error>>
Routes the request to normal routes and returns their result.
Useful for tests and niche applications.
Returns None if no route was found matching the request.
pub async fn request<R>(&self, req: &R) -> Result<R::Response, R::Error>
pub async fn request_with_uri<R>( &self, uri: impl AsRef<str>, req: &R, ) -> Result<R::Response, R::Error>
pub async fn request_with_header<R>( &self, uri: impl AsRef<str>, req: &R, header: HeaderValues, ) -> Result<R::Response, R::Error>
pub async fn request_raw<R>( &self, req: &mut Request, ) -> Result<R::Response, R::Error>
Auto Trait Implementations§
impl !RefUnwindSafe for FirePitApi
impl !UnwindSafe for FirePitApi
impl Freeze for FirePitApi
impl Send for FirePitApi
impl Sync for FirePitApi
impl Unpin for FirePitApi
impl UnsafeUnpin for FirePitApi
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