pub struct MiddlewareInfo {
pub name: String,
pub type_name: String,
pub order: usize,
pub can_short_circuit: bool,
pub config_summary: Option<String>,
}Expand description
Information about a single middleware layer.
Fields§
§name: StringDisplay name of the middleware.
type_name: StringType name for debugging (optional).
order: usizeExecution order (1-based).
can_short_circuit: boolWhether middleware can short-circuit the request.
config_summary: Option<String>Optional configuration summary.
Implementations§
Source§impl MiddlewareInfo
impl MiddlewareInfo
Sourcepub fn with_config(self, config: &str) -> Self
pub fn with_config(self, config: &str) -> Self
Set a configuration summary.
Sourcepub fn with_type_name(self, type_name: &str) -> Self
pub fn with_type_name(self, type_name: &str) -> Self
Set a type name different from the display name.
Sourcepub fn short_circuits(self) -> Self
pub fn short_circuits(self) -> Self
Mark this middleware as short-circuiting.
Trait Implementations§
Source§impl Clone for MiddlewareInfo
impl Clone for MiddlewareInfo
Source§fn clone(&self) -> MiddlewareInfo
fn clone(&self) -> MiddlewareInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MiddlewareInfo
impl RefUnwindSafe for MiddlewareInfo
impl Send for MiddlewareInfo
impl Sync for MiddlewareInfo
impl Unpin for MiddlewareInfo
impl UnsafeUnpin for MiddlewareInfo
impl UnwindSafe for MiddlewareInfo
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