Struct fire_http::FireBuilder
source · [−]pub struct FireBuilder<D> { /* private fields */ }Expand description
FireBuilder gathers all materials needed to light a fire (start a server).
Implementations
sourceimpl<D: Data> FireBuilder<D>
impl<D: Data> FireBuilder<D>
sourcepub fn add_raw_route<R>(&mut self, route: R) where
R: RawRoute<D> + 'static,
pub fn add_raw_route<R>(&mut self, route: R) where
R: RawRoute<D> + 'static,
Adds a RawRoute to the fire.
sourcepub fn add_route<R>(&mut self, route: R) where
R: Route<D> + 'static,
pub fn add_route<R>(&mut self, route: R) where
R: Route<D> + 'static,
Adds a Route to the fire.
sourcepub fn add_catcher<C>(&mut self, catcher: C) where
C: Catcher<D> + 'static,
pub fn add_catcher<C>(&mut self, catcher: C) where
C: Catcher<D> + '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<D> !RefUnwindSafe for FireBuilder<D>
impl<D> Send for FireBuilder<D> where
D: Send,
impl<D> Sync for FireBuilder<D> where
D: Sync,
impl<D> Unpin for FireBuilder<D> where
D: Unpin,
impl<D> !UnwindSafe for FireBuilder<D>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more