Struct ngyn_hyper::HyperApplication
source · pub struct HyperApplication { /* private fields */ }Expand description
Represents a Hyper-based application.
Implementations§
Trait Implementations§
source§impl Default for HyperApplication
impl Default for HyperApplication
source§fn default() -> HyperApplication
fn default() -> HyperApplication
Returns the “default value” for a type. Read more
source§impl NgynPlatform for HyperApplication
impl NgynPlatform for HyperApplication
fn data_mut(&mut self) -> &mut PlatformData
Auto Trait Implementations§
impl Freeze for HyperApplication
impl !RefUnwindSafe for HyperApplication
impl Send for HyperApplication
impl Sync for HyperApplication
impl Unpin for HyperApplication
impl !UnwindSafe for HyperApplication
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> NgynEngine for Twhere
T: NgynPlatform,
impl<T> NgynEngine for Twhere
T: NgynPlatform,
source§fn route(
&mut self,
path: &str,
method: Method,
handler: Box<dyn Fn(&mut NgynContext, &mut Response<Full<Bytes>>) + Send + Sync>,
)
fn route( &mut self, path: &str, method: Method, handler: Box<dyn Fn(&mut NgynContext, &mut Response<Full<Bytes>>) + Send + Sync>, )
Adds a route to the application. Read more
source§fn get(&mut self, path: &str, handler: impl RouteHandle)
fn get(&mut self, path: &str, handler: impl RouteHandle)
Adds a new route to the
NgynApplication with the Method::Get.source§fn post(&mut self, path: &str, handler: impl RouteHandle)
fn post(&mut self, path: &str, handler: impl RouteHandle)
Adds a new route to the
NgynApplication with the Method::Post.source§fn put(&mut self, path: &str, handler: impl RouteHandle)
fn put(&mut self, path: &str, handler: impl RouteHandle)
Adds a new route to the
NgynApplication with the Method::Put.source§fn delete(&mut self, path: &str, handler: impl RouteHandle)
fn delete(&mut self, path: &str, handler: impl RouteHandle)
Adds a new route to the
NgynApplication with the Method::Delete.source§fn patch(&mut self, path: &str, handler: impl RouteHandle)
fn patch(&mut self, path: &str, handler: impl RouteHandle)
Adds a new route to the
NgynApplication with the Method::Patch.source§fn head(&mut self, path: &str, handler: impl RouteHandle)
fn head(&mut self, path: &str, handler: impl RouteHandle)
Adds a new route to the
NgynApplication with the Method::Head.source§fn use_middleware(&mut self, middleware: impl NgynMiddleware + 'static)
fn use_middleware(&mut self, middleware: impl NgynMiddleware + 'static)
Adds a middleware to the application. Read more