Skip to main content

SoftwareDiagnostics

Struct SoftwareDiagnostics 

Source
pub struct SoftwareDiagnostics<'a, M: SoftwareMetrics> { /* private fields */ }
Expand description

The Software Diagnostics cluster (§11.13).

Implementations§

Source§

impl<'a, M: SoftwareMetrics> SoftwareDiagnostics<'a, M>

Source

pub const fn new(metrics: &'a M, features: u32) -> Self

A cluster over a runtime’s own metrics.

Trait Implementations§

Source§

impl<M: SoftwareMetrics> Cluster for SoftwareDiagnostics<'_, M>

So a tuple of clusters can dispatch to it by id.

Source§

const ID: ClusterId = ID

The cluster id this implementation serves.
Source§

impl<M: SoftwareMetrics> ClusterHandler for SoftwareDiagnostics<'_, M>

Source§

fn read( &self, resolved: &Resolved<'_>, _ctx: &InteractionContext<'_>, w: &mut TlvWriter<'_>, tag: Tag, ) -> Result<(), Status>

Writes the value of resolved’s attribute under tag. Read more
Source§

fn invoke( &self, resolved: &ResolvedCommand<'_>, _fields: Option<&[u8]>, _ctx: &InteractionContext<'_>, _w: &mut TlvWriter<'_>, _tag: Tag, ) -> Result<Option<CommandId>, StatusIb>

Runs a command. Read more
Source§

fn data_version(&self, _resolved: &Resolved<'_>) -> Option<u32>

The cluster instance’s data version (§7.10.3), if it tracks one. Read more
Source§

fn write( &self, _resolved: &Resolved<'_>, _data: &[u8], _op: WriteOp, _ctx: &InteractionContext<'_>, ) -> Result<(), Status>

Writes data — the encoded TLV element, tag included — into the attribute. Read more
Source§

fn on_lifecycle(&self, _event: Lifecycle)

Reacts to something that happened to the node (see Lifecycle). Read more
Source§

impl<'a, M: Debug + SoftwareMetrics> Debug for SoftwareDiagnostics<'a, M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, M> Forget for SoftwareDiagnostics<'a, M>

§

impl<'a, M> Freeze for SoftwareDiagnostics<'a, M>
where &'a M: Freeze,

§

impl<'a, M> Move for SoftwareDiagnostics<'a, M>

§

impl<'a, M> RefUnwindSafe for SoftwareDiagnostics<'a, M>

§

impl<'a, M> Send for SoftwareDiagnostics<'a, M>
where &'a M: Send,

§

impl<'a, M> Sync for SoftwareDiagnostics<'a, M>
where &'a M: Sync,

§

impl<'a, M> Unpin for SoftwareDiagnostics<'a, M>
where &'a M: Unpin,

§

impl<'a, M> UnsafeUnpin for SoftwareDiagnostics<'a, M>

§

impl<'a, M> UnwindSafe for SoftwareDiagnostics<'a, M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.