pub struct GraphEdge {
pub from: String,
pub to: String,
pub label: Option<String>,
pub edge_type: String,
pub weight: f64,
pub directed: bool,
pub attributes: HashMap<String, String>,
}Expand description
Graph edge for visualization
Fields§
§from: String§to: String§label: Option<String>§edge_type: String§weight: f64§directed: bool§attributes: HashMap<String, String>Implementations§
Source§impl GraphEdge
impl GraphEdge
pub fn new(from: String, to: String) -> Self
pub fn with_label(self, label: String) -> Self
pub fn with_type(self, edge_type: String) -> Self
pub fn with_weight(self, weight: f64) -> Self
pub fn undirected(self) -> Self
pub fn with_attribute(self, key: String, value: String) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphEdge
impl<'de> Deserialize<'de> for GraphEdge
Source§fn 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 Freeze for GraphEdge
impl RefUnwindSafe for GraphEdge
impl Send for GraphEdge
impl Sync for GraphEdge
impl Unpin for GraphEdge
impl UnwindSafe for GraphEdge
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
Mutably borrows from an owned value. Read more