pub struct NetworkDiagnostics { /* private fields */ }Expand description
Network diagnostics tool
Implementations§
Source§impl NetworkDiagnostics
impl NetworkDiagnostics
Sourcepub fn with_history_size(max_history: usize) -> Self
pub fn with_history_size(max_history: usize) -> Self
Create diagnostics with custom history size
Sourcepub fn run_all_tests(&mut self) -> Vec<DiagnosticResult>
pub fn run_all_tests(&mut self) -> Vec<DiagnosticResult>
Run all diagnostic tests
Sourcepub fn run_test(&mut self, test: DiagnosticTest) -> DiagnosticResult
pub fn run_test(&mut self, test: DiagnosticTest) -> DiagnosticResult
Run a specific diagnostic test
Sourcepub fn results_history(&self) -> &[DiagnosticResult]
pub fn results_history(&self) -> &[DiagnosticResult]
Get diagnostic results history
Sourcepub fn latest_result(&self, test: DiagnosticTest) -> Option<&DiagnosticResult>
pub fn latest_result(&self, test: DiagnosticTest) -> Option<&DiagnosticResult>
Get latest test result for a specific test
Sourcepub fn generate_report(&self) -> String
pub fn generate_report(&self) -> String
Generate comprehensive diagnostic report
Sourcepub fn record_metrics(&mut self, metrics: PerformanceMetrics)
pub fn record_metrics(&mut self, metrics: PerformanceMetrics)
Record performance metrics
Sourcepub fn latest_metrics(&self) -> Option<&PerformanceMetrics>
pub fn latest_metrics(&self) -> Option<&PerformanceMetrics>
Get latest performance metrics
Sourcepub fn metrics_history(&self) -> &[(Instant, PerformanceMetrics)]
pub fn metrics_history(&self) -> &[(Instant, PerformanceMetrics)]
Get performance metrics history
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NetworkDiagnostics
impl RefUnwindSafe for NetworkDiagnostics
impl Send for NetworkDiagnostics
impl Sync for NetworkDiagnostics
impl Unpin for NetworkDiagnostics
impl UnwindSafe for NetworkDiagnostics
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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 more