pub struct Diagnostics { /* private fields */ }Expand description
Shared diagnostics context injected into SCPI sessions.
Implementations§
Source§impl Diagnostics
impl Diagnostics
pub fn new(address: impl Into<String>) -> Diagnostics
pub fn with_health(self, health: Arc<Mutex<DeviceHealth>>) -> Diagnostics
pub fn with_observer(self, observer: Arc<dyn CommsObserver>) -> Diagnostics
pub fn address(&self) -> &str
pub fn record_success( &self, kind: CommsEventKind, command: Option<&str>, attempt: u32, elapsed: Duration, )
pub fn record_failure( &self, kind: CommsEventKind, command: Option<&str>, attempt: u32, elapsed: Duration, detail: &str, )
Trait Implementations§
Source§impl Clone for Diagnostics
impl Clone for Diagnostics
Source§fn clone(&self) -> Diagnostics
fn clone(&self) -> Diagnostics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Diagnostics
impl !UnwindSafe for Diagnostics
impl Freeze for Diagnostics
impl Send for Diagnostics
impl Sync for Diagnostics
impl Unpin for Diagnostics
impl UnsafeUnpin for Diagnostics
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