pub struct ElectricalComponentStateSnapshot {
pub origin_time: Option<Timestamp>,
pub states: Vec<i32>,
pub warnings: Vec<ElectricalComponentDiagnostic>,
pub errors: Vec<ElectricalComponentDiagnostic>,
}Expand description
Representation of a component state, warnings, and errors.
Fields§
§origin_time: Option<Timestamp>The UTC time when the state was originally captured.
states: Vec<i32>List of operational states currently active for the component.
!!! note This list is treated as a set, and therefore its members will be unique, i.e., no state will exist twice in this list.
!!! note
If the state is ELECTRICAL_COMPONENT_STATE_CODE_ERROR, then the
electrical component is in an error state. In such cases, the errors
field will be populated with the list of errors.
warnings: Vec<ElectricalComponentDiagnostic>List of non-critical warnings detected for the component.
!!! note This list is treated as a set, and therefore its members will be unique, i.e., no state will exist twice in this list.
!!! note Warnings may be reported even when the component is operational.
errors: Vec<ElectricalComponentDiagnostic>List of critical errors currently affecting the component.
!!! note This list is treated as a set, and therefore its members will be unique, i.e., no state will exist twice in this list.
!!! note This list is expected to have errors if and only if the electrical component is in an error state.
Implementations§
Source§impl ElectricalComponentStateSnapshot
impl ElectricalComponentStateSnapshot
Sourcepub fn states(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<ElectricalComponentStateCode>>
pub fn states( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<ElectricalComponentStateCode>>
Returns an iterator which yields the valid enum values contained in states.
Sourcepub fn push_states(&mut self, value: ElectricalComponentStateCode)
pub fn push_states(&mut self, value: ElectricalComponentStateCode)
Appends the provided enum value to states.
Trait Implementations§
Source§impl Clone for ElectricalComponentStateSnapshot
impl Clone for ElectricalComponentStateSnapshot
Source§fn clone(&self) -> ElectricalComponentStateSnapshot
fn clone(&self) -> ElectricalComponentStateSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Message for ElectricalComponentStateSnapshot
impl Message for ElectricalComponentStateSnapshot
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for ElectricalComponentStateSnapshot
impl PartialEq for ElectricalComponentStateSnapshot
Source§fn eq(&self, other: &ElectricalComponentStateSnapshot) -> bool
fn eq(&self, other: &ElectricalComponentStateSnapshot) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ElectricalComponentStateSnapshot
Auto Trait Implementations§
impl Freeze for ElectricalComponentStateSnapshot
impl RefUnwindSafe for ElectricalComponentStateSnapshot
impl Send for ElectricalComponentStateSnapshot
impl Sync for ElectricalComponentStateSnapshot
impl Unpin for ElectricalComponentStateSnapshot
impl UnsafeUnpin for ElectricalComponentStateSnapshot
impl UnwindSafe for ElectricalComponentStateSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request