pub struct ActixMwConfig {
pub allow_pending: bool,
pub allow_blocked: bool,
pub prefer_html: bool,
pub manual_mode: bool,
pub port: String,
pub instance: String,
}Expand description
Runtime behaviour flags for the middleware.
Fields§
§allow_pending: boolIf true, requests whose EnvStatus is PendingApproval will be let through.
allow_blocked: boolIf true, requests whose EnvStatus is Blocked will be let through.
prefer_html: boolIf true, the middleware will prefer returning HTML even when the client
doesn’t explicitly ask for it (handy for browsers).
If false, falls back to plain‑text/JSON unless the Accept header contains text/html.
manual_mode: boolIf true, the middleware won’t do any automatic decision – it will always
call the inner service and merely log the EnvStatus.
This lets the application layer decide what to do.
port: String§instance: StringTrait Implementations§
Source§impl Clone for ActixMwConfig
impl Clone for ActixMwConfig
Source§fn clone(&self) -> ActixMwConfig
fn clone(&self) -> ActixMwConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActixMwConfig
impl Debug for ActixMwConfig
Auto Trait Implementations§
impl Freeze for ActixMwConfig
impl RefUnwindSafe for ActixMwConfig
impl Send for ActixMwConfig
impl Sync for ActixMwConfig
impl Unpin for ActixMwConfig
impl UnsafeUnpin for ActixMwConfig
impl UnwindSafe for ActixMwConfig
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