pub struct ElectricalComponent {
pub id: u64,
pub microgrid_id: u64,
pub name: String,
pub category: i32,
pub category_specific_info: Option<ElectricalComponentCategorySpecificInfo>,
pub manufacturer: String,
pub model_name: String,
pub operational_lifetime: Option<Lifetime>,
pub metric_config_bounds: Vec<MetricConfigBounds>,
}Expand description
Microgrid electrical component details.
Fields§
§id: u64The component ID.
microgrid_id: u64Unique identifier of the parent microgrid_id.
name: StringThe component name.
category: i32The component category. E.g., Inverter, Battery, etc.
category_specific_info: Option<ElectricalComponentCategorySpecificInfo>The metadata specific to the component category type.
manufacturer: StringThe component manufacturer.
model_name: StringThe model name of the component.
operational_lifetime: Option<Lifetime>The operational lifetime of the component.
metric_config_bounds: Vec<MetricConfigBounds>List of rated bounds present for the component identified by Metric.
Implementations§
Source§impl ElectricalComponent
impl ElectricalComponent
Sourcepub fn category(&self) -> ElectricalComponentCategory
pub fn category(&self) -> ElectricalComponentCategory
Returns the enum value of category, or the default if the field is set to an invalid enum value.
Sourcepub fn set_category(&mut self, value: ElectricalComponentCategory)
pub fn set_category(&mut self, value: ElectricalComponentCategory)
Sets category to the provided enum value.
Source§impl ElectricalComponent
impl ElectricalComponent
Sourcepub fn is_inverter(&self) -> bool
pub fn is_inverter(&self) -> bool
Returns true if the component is an inverter, false otherwise.
Sourcepub fn is_pv_inverter(&self) -> bool
pub fn is_pv_inverter(&self) -> bool
Returns true if the component is a PV inverter, false otherwise.
Sourcepub fn is_battery_inverter(&self) -> bool
pub fn is_battery_inverter(&self) -> bool
Returns true if the component is a battery inverter, false otherwise.
Sourcepub fn is_hybrid_inverter(&self) -> bool
pub fn is_hybrid_inverter(&self) -> bool
Returns true if the component is a hybrid inverter, false otherwise.
Trait Implementations§
Source§impl Clone for ElectricalComponent
impl Clone for ElectricalComponent
Source§fn clone(&self) -> ElectricalComponent
fn clone(&self) -> ElectricalComponent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ElectricalComponent
impl Debug for ElectricalComponent
Source§impl Default for ElectricalComponent
impl Default for ElectricalComponent
Source§impl Message for ElectricalComponent
impl Message for ElectricalComponent
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 Node for ElectricalComponent
impl Node for ElectricalComponent
Source§fn component_id(&self) -> u64
fn component_id(&self) -> u64
Source§fn category(&self) -> ComponentCategory
fn category(&self) -> ComponentCategory
Source§impl PartialEq for ElectricalComponent
impl PartialEq for ElectricalComponent
impl StructuralPartialEq for ElectricalComponent
Auto Trait Implementations§
impl Freeze for ElectricalComponent
impl RefUnwindSafe for ElectricalComponent
impl Send for ElectricalComponent
impl Sync for ElectricalComponent
impl Unpin for ElectricalComponent
impl UnsafeUnpin for ElectricalComponent
impl UnwindSafe for ElectricalComponent
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