pub struct Graph {
pub nodes: Vec<Node>,
pub edges: Vec<Edge>,
}Fields§
§nodes: Vec<Node>§edges: Vec<Edge>Implementations§
Source§impl Graph
impl Graph
pub fn new(nodes: Vec<Node>, edges: Vec<Edge>) -> Self
pub fn from_yaml(yaml: &str) -> Result<Self>
pub fn to_yaml(&self) -> Result<String>
pub fn from_json(json: &str) -> Result<Self>
pub fn to_json(&self) -> Result<String>
pub fn from_xml(xml: &str) -> Result<Self>
pub fn to_xml(&self) -> Result<String>
pub fn builder() -> GraphBuilder
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Graph
impl<'de> Deserialize<'de> for Graph
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
impl StructuralPartialEq for Graph
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
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