pub struct WasmLayerConfig {
pub report_logs_in_timings: bool,
pub console: ConsoleConfig,
pub max_level: Level,
pub show_fields: bool,
pub show_origin: bool,
pub origin_base_url: Option<String>,
}
Expand description
Configuration parameters for the WasmLayer.
Fields§
§report_logs_in_timings: bool
In dev-tools, report timings of traces
console: ConsoleConfig
See ConsoleConfig
max_level: Level
Maximum log level
show_fields: bool
Show/hide fields of types
show_origin: bool
Show origin (line number, source)
origin_base_url: Option<String>
Optional URL to prepend to origins. E.g. to allow for showing full file paths that can be navigated when logged in the browser console.
Implementations§
Source§impl WasmLayerConfig
impl WasmLayerConfig
Sourcepub fn new() -> WasmLayerConfig
pub fn new() -> WasmLayerConfig
Create a default WasmLayerConfig
Sourcepub fn set_report_logs_in_timings(
&mut self,
report_logs_in_timings: bool,
) -> &mut Self
pub fn set_report_logs_in_timings( &mut self, report_logs_in_timings: bool, ) -> &mut Self
Set whether events should appear in performance Timings
Sourcepub fn set_max_level(&mut self, max_level: Level) -> &mut Self
pub fn set_max_level(&mut self, max_level: Level) -> &mut Self
Set the maximal level on which events should be displayed
Sourcepub fn set_console_config(&mut self, console_config: ConsoleConfig) -> &mut Self
pub fn set_console_config(&mut self, console_config: ConsoleConfig) -> &mut Self
Set if and how events should be displayed in the browser console
pub fn set_show_origin(&mut self, show_origin: bool) -> &mut Self
Sourcepub fn set_show_fields(&mut self, show_fields: bool) -> &mut Self
pub fn set_show_fields(&mut self, show_fields: bool) -> &mut Self
Set if events will show additional fields, usually the file or line.
Sourcepub fn set_origin_base_url(
&mut self,
origin_base_url: impl ToString,
) -> &mut Self
pub fn set_origin_base_url( &mut self, origin_base_url: impl ToString, ) -> &mut Self
Set the base URL for origins. This can be used to show full file paths in the browser console.
Sourcepub fn console_enabled(&self) -> bool
pub fn console_enabled(&self) -> bool
True if the console reporting spans
Trait Implementations§
Source§impl Clone for WasmLayerConfig
impl Clone for WasmLayerConfig
Source§fn clone(&self) -> WasmLayerConfig
fn clone(&self) -> WasmLayerConfig
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 moreSource§impl Debug for WasmLayerConfig
impl Debug for WasmLayerConfig
Source§impl Default for WasmLayerConfig
impl Default for WasmLayerConfig
Source§impl PartialEq for WasmLayerConfig
impl PartialEq for WasmLayerConfig
impl Eq for WasmLayerConfig
impl StructuralPartialEq for WasmLayerConfig
Auto Trait Implementations§
impl Freeze for WasmLayerConfig
impl RefUnwindSafe for WasmLayerConfig
impl Send for WasmLayerConfig
impl Sync for WasmLayerConfig
impl Unpin for WasmLayerConfig
impl UnwindSafe for WasmLayerConfig
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