pub trait Edge {
// Required methods
fn source(&self) -> u64;
fn destination(&self) -> u64;
}Expand description
This trait needs to be implemented by the type that represents a connection.
Read more about why this is necessary here.
Example implementation for microgrid API v0.18.1:
ⓘ
impl frequenz_microgrid_component_graph::Edge
for common::v1alpha8::microgrid::electrical_components::ElectricalComponentConnection
{
fn source(&self) -> u64 {
self.source_electrical_component_id
}
fn destination(&self) -> u64 {
self.destination_electrical_component_id
}
}Required Methods§
Sourcefn destination(&self) -> u64
fn destination(&self) -> u64
Returns the destination component id of the connection.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".