pub struct RequestHandler { /* private fields */ }Implementations§
Source§impl RequestHandler
impl RequestHandler
pub fn builder<P: AsRef<Path>>(base_directory: P) -> RequestHandlerBuilder
pub fn check_security( &self, ctx: &ServerContext, ) -> Option<Result<GurtResponse, GurtError>>
pub fn register_connection(&self, client_ip: IpAddr)
pub fn unregister_connection(&self, client_ip: IpAddr)
pub async fn handle_root_request_with_context( &self, ctx: ServerContext, ) -> Result<GurtResponse, GurtError>
pub async fn handle_file_request_with_context( &self, request_path: &str, ctx: ServerContext, ) -> Result<GurtResponse, GurtError>
pub async fn handle_method_request_with_context( &self, ctx: ServerContext, ) -> Result<GurtResponse, GurtError>
pub async fn handle_root_request(&self) -> Result<GurtResponse, GurtError>
pub async fn handle_file_request( &self, request_path: &str, ) -> Result<GurtResponse, GurtError>
Auto Trait Implementations§
impl !RefUnwindSafe for RequestHandler
impl !UnwindSafe for RequestHandler
impl Freeze for RequestHandler
impl Send for RequestHandler
impl Sync for RequestHandler
impl Unpin for RequestHandler
impl UnsafeUnpin for RequestHandler
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