pub struct GraphView<'a> {
pub ids: &'a IdMap,
pub syms: &'a Interner,
pub labels: &'a [u32],
pub props: &'a ColumnStore,
pub topo: &'a Topology,
pub edge_props: &'a EdgeProps,
pub mask: Option<&'a HashSet<u32>>,
}Expand description
Read-only twin of GraphMut. Holds only borrowed graph state.
Fields§
§ids: &'a IdMap§syms: &'a Interner§labels: &'a [u32]§props: &'a ColumnStore§topo: &'a Topology§edge_props: &'a EdgeProps§mask: Option<&'a HashSet<u32>>Optional query-scoped node visibility set. None = all nodes visible.
When Some(set), only dense ids present in set are accessible.
Implementations§
Source§impl<'a> GraphView<'a>
impl<'a> GraphView<'a>
Sourcepub fn visible(&self, id: u32) -> bool
pub fn visible(&self, id: u32) -> bool
Returns true if id is visible under the current mask.
Always true when no mask is set.
pub fn node_id(&self, key: &str) -> Option<u32>
pub fn key_of(&self, id: u32) -> &str
pub fn label_of(&self, id: u32) -> Option<&str>
pub fn nodes_with_label(&self, label: &str) -> Vec<u32>
pub fn prop(&self, id: u32, field: &str) -> Option<&Value>
Auto Trait Implementations§
impl<'a> Freeze for GraphView<'a>
impl<'a> RefUnwindSafe for GraphView<'a>
impl<'a> Send for GraphView<'a>
impl<'a> Sync for GraphView<'a>
impl<'a> Unpin for GraphView<'a>
impl<'a> UnsafeUnpin for GraphView<'a>
impl<'a> UnwindSafe for GraphView<'a>
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