Struct ratio_graph::Edge
source · [−]pub struct Edge {
pub id: Uuid,
pub name: String,
pub kind: String,
pub labels: Vec<String>,
pub weights: HashMap<String, f64>,
pub annotations: HashMap<String, String>,
pub source: Uuid,
pub target: Uuid,
}Fields
id: UuidUnique instance ID.
name: StringInstance name.
kind: StringMain category of this instance.
labels: Vec<String>Instance labels.
weights: HashMap<String, f64>Numeric instance weights.
annotations: HashMap<String, String>Miscellaneous data fields for this instance.
source: UuidSource node ID.
target: UuidTarget node ID.
Implementations
sourceimpl Edge
impl Edge
sourcepub fn new(
id: Option<Uuid>,
name: Option<String>,
kind: Option<String>,
labels: Option<Vec<String>>,
weights: Option<HashMap<String, f64>>,
annotations: Option<HashMap<String, String>>,
source: Uuid,
target: Uuid
) -> Self
pub fn new(
id: Option<Uuid>,
name: Option<String>,
kind: Option<String>,
labels: Option<Vec<String>>,
weights: Option<HashMap<String, f64>>,
annotations: Option<HashMap<String, String>>,
source: Uuid,
target: Uuid
) -> Self
Create a new edge struct with arguments.
pub fn default() -> (Self, Node, Node)
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Edge
impl<'de> Deserialize<'de> for Edge
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnwindSafe for Edge
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more