pub struct MaintenanceModeConfig {
pub enabled: Arc<RwLock<bool>>,
pub response: MaintenanceResponse,
pub allowed_paths: Vec<PathMatch>,
pub allowed_methods: HashSet<ElifMethod>,
pub allowed_ips: HashSet<String>,
pub bypass_header: Option<(String, String)>,
pub add_retry_after: Option<u64>,
}
Expand description
Maintenance mode configuration
Fields§
§enabled: Arc<RwLock<bool>>
Whether maintenance mode is currently enabled
response: MaintenanceResponse
Response to send during maintenance mode
allowed_paths: Vec<PathMatch>
Paths that should be allowed during maintenance mode
allowed_methods: HashSet<ElifMethod>
HTTP methods that should be allowed during maintenance mode
allowed_ips: HashSet<String>
IP addresses that should bypass maintenance mode
bypass_header: Option<(String, String)>
Custom header to bypass maintenance mode
add_retry_after: Option<u64>
Whether to add Retry-After header
Trait Implementations§
Source§impl Debug for MaintenanceModeConfig
impl Debug for MaintenanceModeConfig
Auto Trait Implementations§
impl Freeze for MaintenanceModeConfig
impl RefUnwindSafe for MaintenanceModeConfig
impl Send for MaintenanceModeConfig
impl Sync for MaintenanceModeConfig
impl Unpin for MaintenanceModeConfig
impl UnwindSafe for MaintenanceModeConfig
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