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
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.