pub struct DebugbarConfig {Show 39 fields
pub enabled: Option<bool>,
pub history: usize,
pub history_hours: u64,
pub slow_query_ms: u64,
pub editor: String,
pub headers: bool,
pub inertia_props: bool,
pub backtrace: bool,
pub explain: bool,
pub masked: Vec<String>,
pub storage: String,
pub redis_connection: String,
pub storage_path: Option<String>,
pub open_storage: Option<bool>,
pub force_allow_enable: bool,
pub inject: bool,
pub route_prefix: String,
pub route_domain: Option<String>,
pub except: Vec<String>,
pub remote_sites_path: Option<String>,
pub local_sites_path: Option<String>,
pub server_timing: bool,
pub clockwork: bool,
pub disabled_collectors: Vec<String>,
pub session: bool,
pub user: bool,
pub body: bool,
pub config: bool,
pub log_tail: bool,
pub log_tail_lines: usize,
pub backtrace_frames: usize,
pub backtrace_exclude: Vec<String>,
pub query_soft_limit: usize,
pub query_hard_limit: usize,
pub only_slow_queries: bool,
pub query_exclude_paths: Vec<String>,
pub timeline_queries: bool,
pub show_query_result: bool,
pub view_exclude: Vec<String>,
}Fields§
§enabled: Option<bool>§history: usize§history_hours: u64§slow_query_ms: u64§editor: String§headers: bool§inertia_props: bool§backtrace: bool§explain: bool§masked: Vec<String>§storage: String§redis_connection: String§storage_path: Option<String>§open_storage: Option<bool>§force_allow_enable: bool§inject: bool§route_prefix: String§route_domain: Option<String>§except: Vec<String>§remote_sites_path: Option<String>§local_sites_path: Option<String>§server_timing: bool§clockwork: bool§disabled_collectors: Vec<String>§session: bool§user: bool§body: bool§config: bool§log_tail: bool§log_tail_lines: usize§backtrace_frames: usize§backtrace_exclude: Vec<String>§query_soft_limit: usize§query_hard_limit: usize§only_slow_queries: bool§query_exclude_paths: Vec<String>§timeline_queries: bool§show_query_result: bool§view_exclude: Vec<String>Implementations§
Source§impl DebugbarConfig
impl DebugbarConfig
Sourcepub fn from_env(env: &Env) -> Self
pub fn from_env(env: &Env) -> Self
Read the section from the environment, starting from its defaults.
| Field | Variable | Default |
|---|---|---|
enabled | DEBUGBAR_ENABLED | none |
history | DEBUGBAR_HISTORY | 50 |
history_hours | DEBUGBAR_HISTORY_HOURS | 24 |
slow_query_ms | DEBUGBAR_SLOW_QUERY_MS | 100 |
editor | DEBUGBAR_EDITOR | vscode |
headers | DEBUGBAR_COLLECT_HEADERS | true |
inertia_props | DEBUGBAR_COLLECT_INERTIA_PROPS | true |
backtrace | DEBUGBAR_BACKTRACE | false |
explain | DEBUGBAR_EXPLAIN | true |
masked | DEBUGBAR_MASKED, comma-separated | none |
storage | DEBUGBAR_STORAGE | file |
redis_connection | DEBUGBAR_REDIS_CONNECTION | default |
storage_path | DEBUGBAR_STORAGE_PATH | none |
open_storage | DEBUGBAR_OPEN_STORAGE | none |
force_allow_enable | DEBUGBAR_FORCE_ALLOW_ENABLE | false |
inject | DEBUGBAR_INJECT | true |
route_prefix | DEBUGBAR_ROUTE_PREFIX | _debugbar |
route_domain | DEBUGBAR_ROUTE_DOMAIN | none |
except | DEBUGBAR_EXCEPT, comma-separated | none |
remote_sites_path | DEBUGBAR_REMOTE_SITES_PATH | none |
local_sites_path | DEBUGBAR_LOCAL_SITES_PATH | none |
server_timing | DEBUGBAR_SERVER_TIMING | false |
clockwork | DEBUGBAR_CLOCKWORK | false |
disabled_collectors | DEBUGBAR_DISABLED_COLLECTORS, comma-separated | none |
session | DEBUGBAR_COLLECT_SESSION | false |
user | DEBUGBAR_COLLECT_USER | false |
body | DEBUGBAR_COLLECT_BODY | true |
config | DEBUGBAR_COLLECT_CONFIG | false |
log_tail | DEBUGBAR_LOG_TAIL | false |
log_tail_lines | DEBUGBAR_LOG_TAIL_LINES | 124 |
backtrace_frames | DEBUGBAR_BACKTRACE_FRAMES | 5 |
backtrace_exclude | DEBUGBAR_BACKTRACE_EXCLUDE, comma-separated | none |
query_soft_limit | DEBUGBAR_QUERY_SOFT_LIMIT | 100 |
query_hard_limit | DEBUGBAR_QUERY_HARD_LIMIT | 500 |
only_slow_queries | DEBUGBAR_ONLY_SLOW_QUERIES | false |
query_exclude_paths | DEBUGBAR_QUERY_EXCLUDE_PATHS, comma-separated | none |
timeline_queries | DEBUGBAR_TIMELINE_QUERIES | false |
show_query_result | DEBUGBAR_SHOW_QUERY_RESULT | false |
view_exclude | DEBUGBAR_VIEW_EXCLUDE, comma-separated | none |
from_env records invalid values and missing required values in env. Those problems
stop the application from starting.
Source§impl DebugbarConfig
impl DebugbarConfig
pub fn collects(&self, collector: &str) -> bool
pub fn prefix(&self) -> String
pub fn editor_root(&self, root: &str) -> String
pub fn allows_history_from(&self, ip: IpAddr) -> bool
pub fn allows_record_from(&self, ip: IpAddr) -> bool
pub fn is_masked(&self, name: &str) -> bool
Trait Implementations§
Source§impl Clone for DebugbarConfig
impl Clone for DebugbarConfig
Source§impl Debug for DebugbarConfig
impl Debug for DebugbarConfig
Auto Trait Implementations§
impl Forget for DebugbarConfig
impl Freeze for DebugbarConfig
impl Move for DebugbarConfig
impl RefUnwindSafe for DebugbarConfig
impl Send for DebugbarConfigwhere
RawVecInner: Send,
impl Sync for DebugbarConfigwhere
RawVecInner: Sync,
impl Unpin for DebugbarConfig
impl UnsafeUnpin for DebugbarConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for DebugbarConfigwhere
RawVecInner: UnwindSafe,
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more