pub struct RealityGraph {
pub repo_id: String,
pub entities: HashMap<String, Entity>,
pub out: HashMap<String, Vec<Relationship>>,
pub inn: HashMap<String, Vec<Relationship>>,
pub components: Vec<Entity>,
pub flows: Vec<Flow>,
pub invariants: Vec<Invariant>,
}Expand description
In-memory view of the reality graph.
Fields§
§repo_id: String§entities: HashMap<String, Entity>§out: HashMap<String, Vec<Relationship>>out edges by subject
inn: HashMap<String, Vec<Relationship>>in edges by object
components: Vec<Entity>§flows: Vec<Flow>§invariants: Vec<Invariant>Implementations§
Source§impl RealityGraph
impl RealityGraph
pub fn all_rels(&self) -> Vec<&Relationship>
Source§impl RealityGraph
impl RealityGraph
pub fn empty() -> RealityGraph
Source§impl RealityGraph
impl RealityGraph
pub fn load(store: &Store) -> Result<RealityGraph>
pub fn entity(&self, id: &str) -> Option<&Entity>
pub fn out_edges(&self, id: &str) -> Vec<&Relationship>
pub fn in_edges(&self, id: &str) -> Vec<&Relationship>
pub fn out_pred(&self, id: &str, predicate: &str) -> Vec<&Relationship>
pub fn in_pred(&self, id: &str, predicate: &str) -> Vec<&Relationship>
Sourcepub fn entities_of_kind(&self, kind: &str) -> Vec<&Entity>
pub fn entities_of_kind(&self, kind: &str) -> Vec<&Entity>
Entities of a given kind (sorted by name for determinism).
Auto Trait Implementations§
impl Freeze for RealityGraph
impl RefUnwindSafe for RealityGraph
impl Send for RealityGraph
impl Sync for RealityGraph
impl Unpin for RealityGraph
impl UnsafeUnpin for RealityGraph
impl UnwindSafe for RealityGraph
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