Struct fire_http::FireBuilder
source · pub struct FireBuilder { /* private fields */ }Expand description
FireBuilder gathers all materials needed to light a fire (start a server).
Implementations
sourceimpl FireBuilder
impl FireBuilder
pub fn add_data<D>(&mut self, data: D)where
D: Any + Send + Sync,
sourcepub fn add_raw_route<R>(&mut self, route: R)where
R: RawRoute + 'static,
pub fn add_raw_route<R>(&mut self, route: R)where
R: RawRoute + 'static,
Adds a RawRoute to the fire.
sourcepub fn add_route<R>(&mut self, route: R)where
R: IntoRoute + 'static,
pub fn add_route<R>(&mut self, route: R)where
R: IntoRoute + 'static,
Adds a Route to the fire.
sourcepub fn add_catcher<C>(&mut self, catcher: C)where
C: Catcher + 'static,
pub fn add_catcher<C>(&mut self, catcher: C)where
C: Catcher + 'static,
Adds a Catcher to the fire.
sourcepub fn request_size_limit(&mut self, size_limit: usize)
pub fn request_size_limit(&mut self, size_limit: usize)
Sets the request size limit. The default is 4 kilobytes.
This can be changed in every Route.
Panics
If the size is zero.
sourcepub fn request_timeout(&mut self, timeout: Duration)
pub fn request_timeout(&mut self, timeout: Duration)
Sets the request timeout. The default is 60 seconds.
This can be changed in every Route.
sourcepub fn hide_startup_message(&mut self)
pub fn hide_startup_message(&mut self)
Prevents the fire from showing a message when the server get’s started.
Auto Trait Implementations
impl !RefUnwindSafe for FireBuilder
impl Send for FireBuilder
impl Sync for FireBuilder
impl Unpin for FireBuilder
impl !UnwindSafe for FireBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more