pub struct GraphFile {
pub metadata: Metadata,
pub nodes: Vec<Node>,
pub edges: Vec<Edge>,
pub notes: Vec<Note>,
}Fields§
§metadata: Metadata§nodes: Vec<Node>§edges: Vec<Edge>§notes: Vec<Note>Implementations§
Source§impl GraphFile
impl GraphFile
pub fn new(name: &str) -> Self
pub fn load(path: &Path) -> Result<Self>
pub fn save(&self, path: &Path) -> Result<()>
pub fn refresh_counts(&mut self)
pub fn node_by_id(&self, id: &str) -> Option<&Node>
pub fn node_by_id_sorted(&self, id: &str) -> Option<&Node>
pub fn node_by_id_mut(&mut self, id: &str) -> Option<&mut Node>
pub fn has_edge(&self, source_id: &str, relation: &str, target_id: &str) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphFile
impl<'de> Deserialize<'de> for GraphFile
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 GraphFile
impl RefUnwindSafe for GraphFile
impl Send for GraphFile
impl Sync for GraphFile
impl Unpin for GraphFile
impl UnsafeUnpin for GraphFile
impl UnwindSafe for GraphFile
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