pub struct DebugTracer { /* private fields */ }Expand description
Debug tracer for the development server
Implementations§
Source§impl DebugTracer
impl DebugTracer
Sourcepub const fn with_verbosity(self, verbosity: DebugVerbosity) -> Self
pub const fn with_verbosity(self, verbosity: DebugVerbosity) -> Self
Set verbosity level
Sourcepub const fn is_enabled(&self) -> bool
pub const fn is_enabled(&self) -> bool
Check if debug mode is enabled
Sourcepub fn log(&self, category: DebugCategory, message: &str)
pub fn log(&self, category: DebugCategory, message: &str)
Log a debug event
Sourcepub fn log_multi(&self, category: DebugCategory, lines: &[&str])
pub fn log_multi(&self, category: DebugCategory, lines: &[&str])
Log a multi-line debug event
Sourcepub fn log_server_start(
&self,
port: u16,
directory: &Path,
cors: bool,
coop_coep: bool,
)
pub fn log_server_start( &self, port: u16, directory: &Path, cors: bool, coop_coep: bool, )
Log server startup
Sourcepub fn log_request(
&self,
method: &str,
path: &str,
client_addr: Option<&str>,
user_agent: Option<&str>,
)
pub fn log_request( &self, method: &str, path: &str, client_addr: Option<&str>, user_agent: Option<&str>, )
Log an incoming request
Sourcepub fn log_resolve(
&self,
request_path: &str,
resolved_path: &Path,
rule: ResolutionRule,
)
pub fn log_resolve( &self, request_path: &str, resolved_path: &Path, rule: ResolutionRule, )
Log file resolution
Sourcepub fn log_response(
&self,
status: u16,
content_type: &str,
content_length: usize,
latency_ms: u64,
)
pub fn log_response( &self, status: u16, content_type: &str, content_length: usize, latency_ms: u64, )
Log a response
Sourcepub fn log_not_found(
&self,
request_path: &str,
searched_paths: &[PathBuf],
suggestions: &[String],
)
pub fn log_not_found( &self, request_path: &str, searched_paths: &[PathBuf], suggestions: &[String], )
Log a 404 error with suggestions
Sourcepub fn log_mime_check(&self, path: &Path, mime_type: &str, is_correct: bool)
pub fn log_mime_check(&self, path: &Path, mime_type: &str, is_correct: bool)
Log MIME type information (especially for WASM)
Sourcepub fn log_ws_connect(&self, client_addr: &str)
pub fn log_ws_connect(&self, client_addr: &str)
Log WebSocket connection
Sourcepub fn log_ws_disconnect(&self, client_addr: &str)
pub fn log_ws_disconnect(&self, client_addr: &str)
Log WebSocket disconnection
Sourcepub fn log_file_change(&self, path: &str, event_type: &str)
pub fn log_file_change(&self, path: &str, event_type: &str)
Log file change event
Trait Implementations§
Source§impl Debug for DebugTracer
impl Debug for DebugTracer
Auto Trait Implementations§
impl !Freeze for DebugTracer
impl RefUnwindSafe for DebugTracer
impl Send for DebugTracer
impl Sync for DebugTracer
impl Unpin for DebugTracer
impl UnsafeUnpin for DebugTracer
impl UnwindSafe for DebugTracer
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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().