pub struct GraphMut<'a> {
pub ids: &'a IdMap,
pub syms: &'a mut Interner,
pub labels: &'a [u32],
pub props: ColumnsView<'a>,
pub topo: &'a mut Topology,
pub base_topo: Option<&'a ArchivedCsr>,
pub edge_props: &'a mut EdgeProps,
}Expand description
Borrowed mutable view of graph state the engine writes derived edges into.
Fields§
§ids: &'a IdMap§syms: &'a mut Interner§labels: &'a [u32]§props: ColumnsView<'a>§topo: &'a mut TopologyEdges written since the snapshot. Reads must go through
GraphMut::neighbors, not this field: on a store opened from a
snapshot the overlay is empty and every edge lives in base_topo.
base_topo: Option<&'a ArchivedCsr>The snapshot’s archived CSR, when one is open. None for a store with
no snapshot, where topo already holds everything.
edge_props: &'a mut EdgePropsImplementations§
Source§impl GraphMut<'_>
impl GraphMut<'_>
Sourcepub fn neighbors(&self, etype: u32, dir: Direction, v: u32) -> Cow<'_, [u32]>
pub fn neighbors(&self, etype: u32, dir: Direction, v: u32) -> Cow<'_, [u32]>
Neighbours of v over (etype, dir), merging the snapshot base with
the post-snapshot overlay and subtracting the overlay’s tombstones.
A rule that reads the graph’s shape — today only a via-hop rule, when it
expands its hop — must use this rather than topo directly. Reading the
overlay alone on a store opened from a snapshot returns nothing, which a
via-hop rule cannot distinguish from “this source reaches no via node”
and answers by retracting every edge it owns.
Auto Trait Implementations§
impl<'a> !UnwindSafe for GraphMut<'a>
impl<'a> Freeze for GraphMut<'a>
impl<'a> RefUnwindSafe for GraphMut<'a>
impl<'a> Send for GraphMut<'a>
impl<'a> Sync for GraphMut<'a>
impl<'a> Unpin for GraphMut<'a>
impl<'a> UnsafeUnpin for GraphMut<'a>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.