pub struct SubSystemReport {
    pub component: u16,
    pub generic: u8,
    pub specific: u8,
}
Expand description

Subsystem Status report

Report the general and specific state of a subsystem. If the generic state is reported as initializing, the specific state should be ignored.

Fields§

§component: u16

Identity of reporting subsystem

§generic: u8

Generic form status report

§specific: u8

Subsystem specific status code

Implementations§

source§

impl SubSystemReport

source

pub fn subsystem(&self) -> Result<Subsystem, u16>

Gets the Subsystem stored in the component bitfield.

Returns Ok if the bitrange contains a known Subsystem variant. Otherwise the value of the bitrange is returned as an Err(u16). This may be because of a malformed message, or because new variants of Subsystem were added.

source

pub fn set_subsystem(&mut self, subsystem: Subsystem)

Set the bitrange corresponding to the Subsystem of the component bitfield.

source

pub fn generic(&self) -> Result<Generic, u8>

Gets the Generic stored in the generic bitfield.

Returns Ok if the bitrange contains a known Generic variant. Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message, or because new variants of Generic were added.

source

pub fn set_generic(&mut self, generic: Generic)

Set the bitrange corresponding to the Generic of the generic bitfield.

Trait Implementations§

source§

impl Clone for SubSystemReport

source§

fn clone(&self) -> SubSystemReport

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SubSystemReport

source§

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

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SubSystemReport

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for SubSystemReport

source§

fn eq(&self, other: &SubSystemReport) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SubSystemReport

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for SubSystemReport

Auto Trait Implementations§

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,