pub struct HyperApplication { /* private fields */ }
Expand description
Represents a Hyper-based application.
Implementations§
Source§impl HyperApplication
impl HyperApplication
pub fn with_config(config: HyperConfig) -> Self
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 NgynHttpPlatform for HyperApplication
impl NgynHttpPlatform 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,
fn any(&mut self, path: &str, handler: impl Into<RouteHandler>)
Source§fn group(&mut self, base_path: &str, registry: impl Fn(&mut GroupRouter<'_>))
fn group(&mut self, base_path: &str, registry: impl Fn(&mut GroupRouter<'_>))
Groups related routes
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
Source§impl<T> NgynHttpEngine for Twhere
T: NgynHttpPlatform,
impl<T> NgynHttpEngine for Twhere
T: NgynHttpPlatform,
Source§fn route(
&mut self,
path: &str,
method: Method,
handler: impl Into<RouteHandler>,
)
fn route( &mut self, path: &str, method: Method, handler: impl Into<RouteHandler>, )
Adds a route to the application. Read more
Source§fn get(&mut self, path: &str, handler: impl Into<RouteHandler>)
fn get(&mut self, path: &str, handler: impl Into<RouteHandler>)
Adds a new route to the
NgynApplication
with the Method::Get
.Source§fn post(&mut self, path: &str, handler: impl Into<RouteHandler>)
fn post(&mut self, path: &str, handler: impl Into<RouteHandler>)
Adds a new route to the
NgynApplication
with the Method::Post
.Source§fn put(&mut self, path: &str, handler: impl Into<RouteHandler>)
fn put(&mut self, path: &str, handler: impl Into<RouteHandler>)
Adds a new route to the
NgynApplication
with the Method::Put
.Source§fn delete(&mut self, path: &str, handler: impl Into<RouteHandler>)
fn delete(&mut self, path: &str, handler: impl Into<RouteHandler>)
Adds a new route to the
NgynApplication
with the Method::Delete
.Source§fn patch(&mut self, path: &str, handler: impl Into<RouteHandler>)
fn patch(&mut self, path: &str, handler: impl Into<RouteHandler>)
Adds a new route to the
NgynApplication
with the Method::Patch
.