pub enum Phase {
Setup,
Monitoring,
Plugins,
Call,
Fallback,
}Expand description
The ordered insertion points for middleware (Ktor-style).
Lower-ordered variants run further “outside” in the onion — first on the way
in, last on the way out. The Ord derivation follows declaration order,
and AppBuilder::build sorts installed
middleware by phase (stably, so install order is preserved within a phase).
use churust_core::Phase;
assert!(Phase::Setup < Phase::Monitoring);
assert!(Phase::Monitoring < Phase::Plugins);
assert!(Phase::Plugins < Phase::Call);
assert!(Phase::Call < Phase::Fallback);Variants§
Setup
Earliest phase, for foundational setup that must wrap everything else.
Monitoring
Observability concerns (logging, metrics, tracing).
Plugins
Default phase for installed plugins/middleware.
Call
Closest to the route handler (e.g. per-call last-mile logic).
Fallback
Latest phase, for catch-all fallbacks.
Trait Implementations§
impl Copy for Phase
impl Eq for Phase
Source§impl Ord for Phase
impl Ord for Phase
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Phase
impl PartialOrd for Phase
impl StructuralPartialEq for Phase
Auto Trait Implementations§
impl Freeze for Phase
impl RefUnwindSafe for Phase
impl Send for Phase
impl Sync for Phase
impl Unpin for Phase
impl UnsafeUnpin for Phase
impl UnwindSafe for Phase
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.