pub struct DefaultService;Expand description
Default service which only returns "drakohttp is here!"
Trait Implementations§
Source§impl HttpService for DefaultService
impl HttpService for DefaultService
Source§async fn request(
&self,
_route: &str,
_req: &HttpRequest,
_body: &mut dyn HttpRead,
) -> HttpResult
async fn request( &self, _route: &str, _req: &HttpRequest, _body: &mut dyn HttpRead, ) -> HttpResult
Serve the request Read more
Source§fn filter(&self, route: &str, req: &HttpRequest) -> HttpResult<()>
fn filter(&self, route: &str, req: &HttpRequest) -> HttpResult<()>
Checks if request is valid Read more
Auto Trait Implementations§
impl Freeze for DefaultService
impl RefUnwindSafe for DefaultService
impl Send for DefaultService
impl Sync for DefaultService
impl Unpin for DefaultService
impl UnwindSafe for DefaultService
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> HttpServiceRaw for Twhere
T: HttpService,
impl<T> HttpServiceRaw for Twhere
T: HttpService,
Source§fn request_raw<'a>(
&'a self,
route: &'a str,
req: &'a HttpRequest,
body: &'a mut dyn HttpRead,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Box<dyn HttpError>>> + Send + 'a>>
fn request_raw<'a>( &'a self, route: &'a str, req: &'a HttpRequest, body: &'a mut dyn HttpRead, ) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Box<dyn HttpError>>> + Send + 'a>>
Serve the request (dyn version)
Source§fn filter_raw(
&self,
route: &str,
req: &HttpRequest,
) -> Result<(), Box<dyn HttpError>>
fn filter_raw( &self, route: &str, req: &HttpRequest, ) -> Result<(), Box<dyn HttpError>>
Checks if request is valid (dyn version)