pub struct Microgrid {
pub id: u64,
pub enterprise_id: u64,
pub name: String,
pub delivery_area: Option<DeliveryArea>,
pub location: Option<Location>,
pub status: i32,
pub create_timestamp: Option<Timestamp>,
}Expand description
Microgrid contains details of a specific microgrid. A microgrid is a localized grouping of electricity generation, energy storage, and loads that normally operates connected to a traditional centralized grid. Each microgrid has a unique identifier and is associated with an enterprise account. A key feature is that it has a physical location and is situated in a delivery area.
!!! info “Key Concepts”
Physical Location: Geographical coordinates specify the exact physical location of the microgrid.Delivery Area: Each microgrid is part of a broader delivery area, which is crucial for energy trading and compliance.
Fields§
§id: u64Unique identifier of the microgrid.
enterprise_id: u64Unique identifier linking this microgrid to its parent enterprise account.
name: StringName of the microgrid.
delivery_area: Option<DeliveryArea>The delivery area where the microgrid is located, as identified by a specific code.
If a microgrid is not connected to the grid (it is an island) it does not belong to any delivery area and this field will be missing, but it could be missing for other reasons as well.
location: Option<Location>Physical location of the microgrid, in geographical co-ordinates.
If the location is not known, this field will be missing.
status: i32The current status of the microgrid.
create_timestamp: Option<Timestamp>The UTC timestamp indicating when the microgrid was initially created.
Implementations§
Source§impl Microgrid
impl Microgrid
Sourcepub fn status(&self) -> MicrogridStatus
pub fn status(&self) -> MicrogridStatus
Returns the enum value of status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: MicrogridStatus)
pub fn set_status(&mut self, value: MicrogridStatus)
Sets status to the provided enum value.
Trait Implementations§
Source§impl Message for Microgrid
impl Message for Microgrid
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.impl StructuralPartialEq for Microgrid
Auto Trait Implementations§
impl Freeze for Microgrid
impl RefUnwindSafe for Microgrid
impl Send for Microgrid
impl Sync for Microgrid
impl Unpin for Microgrid
impl UnsafeUnpin for Microgrid
impl UnwindSafe for Microgrid
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