pub struct BoundApp { /* private fields */ }Expand description
App + bind target + optional programmatic shutdown.
Implementations§
Source§impl BoundApp
impl BoundApp
Sourcepub fn http(self, http: Http) -> Self
pub fn http(self, http: Http) -> Self
Select HTTP protocol mode.
Http::all() enables automatic Alt-Svc: h3=":<port>"; ma=86400.
Sourcepub fn reuseport(self, enabled: bool) -> Self
pub fn reuseport(self, enabled: bool) -> Self
Enable SO_REUSEPORT on TCP bind (requires feature listen-reuseport).
Sourcepub async fn run(self) -> Result<()>
pub async fn run(self) -> Result<()>
CLI commands then Self::serve. Same built-in commands as App::run.
Auto Trait Implementations§
impl !RefUnwindSafe for BoundApp
impl !Sync for BoundApp
impl !UnwindSafe for BoundApp
impl Freeze for BoundApp
impl Send for BoundApp
impl Unpin for BoundApp
impl UnsafeUnpin for BoundApp
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