pub struct NodeView<G, GH = G> {
pub base_graph: G,
pub graph: GH,
pub node: VID,
}Expand description
View of a Node in a Graph
Fields§
§base_graph: G§graph: GH§node: VIDImplementations§
source§impl<'graph, G: GraphViewOps<'graph>> NodeView<G>
impl<'graph, G: GraphViewOps<'graph>> NodeView<G>
sourcepub fn new_internal(graph: G, node: VID) -> NodeView<G>
pub fn new_internal(graph: G, node: VID) -> NodeView<G>
Creates a new NodeView wrapping an internal node reference and a graph
source§impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> NodeView<G, GH>
impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> NodeView<G, GH>
pub fn new_one_hop_filtered(base_graph: G, graph: GH, node: VID) -> Self
source§impl<G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps> NodeView<G, G>
impl<G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps> NodeView<G, G>
pub fn add_constant_properties<C: CollectProperties>( &self, props: C, ) -> Result<(), GraphError>
pub fn set_node_type(&self, new_type: &str) -> Result<(), GraphError>
pub fn update_constant_properties<C: CollectProperties>( &self, props: C, ) -> Result<(), GraphError>
pub fn add_updates<C: CollectProperties, T: TryIntoInputTime>( &self, time: T, props: C, ) -> Result<(), GraphError>
Trait Implementations§
source§impl<G, GH: CoreGraphOps> ConstPropertiesOps for NodeView<G, GH>
impl<G, GH: CoreGraphOps> ConstPropertiesOps for NodeView<G, GH>
source§fn get_const_prop_id(&self, name: &str) -> Option<usize>
fn get_const_prop_id(&self, name: &str) -> Option<usize>
Find id for property name (note this only checks the meta-data, not if the property actually exists for the entity)
fn get_const_prop_name(&self, id: usize) -> ArcStr
fn const_prop_ids(&self) -> Box<dyn Iterator<Item = usize> + '_>
fn get_const_prop(&self, id: usize) -> Option<Prop>
fn const_prop_keys(&self) -> Box<dyn Iterator<Item = ArcStr> + '_>
fn const_prop_values(&self) -> Vec<Prop>
source§impl<'graph, G, GH: GraphViewOps<'graph>> Display for NodeView<G, GH>
impl<'graph, G, GH: GraphViewOps<'graph>> Display for NodeView<G, GH>
source§impl<G, GH: CoreGraphOps> Hash for NodeView<G, GH>
impl<G, GH: CoreGraphOps> Hash for NodeView<G, GH>
source§impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> OneHopFilter<'graph> for NodeView<G, GH>
impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> OneHopFilter<'graph> for NodeView<G, GH>
type BaseGraph = G
type FilteredGraph = GH
type Filtered<GHH: GraphViewOps<'graph>> = NodeView<G, GHH>
fn current_filter(&self) -> &Self::FilteredGraph
fn base_graph(&self) -> &Self::BaseGraph
fn one_hop_filtered<GHH: GraphViewOps<'graph>>( &self, filtered_graph: GHH, ) -> Self::Filtered<GHH>
source§impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> Ord for NodeView<G, GH>
impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> Ord for NodeView<G, GH>
source§impl<G1: CoreGraphOps, G1H, G2: CoreGraphOps, G2H> PartialEq<NodeView<G2, G2H>> for NodeView<G1, G1H>
impl<G1: CoreGraphOps, G1H, G2: CoreGraphOps, G2H> PartialEq<NodeView<G2, G2H>> for NodeView<G1, G1H>
source§impl<'graph, G1: GraphViewOps<'graph>, G1H: GraphViewOps<'graph>, G2: GraphViewOps<'graph>, G2H: GraphViewOps<'graph>> PartialOrd<NodeView<G2, G2H>> for NodeView<G1, G1H>
impl<'graph, G1: GraphViewOps<'graph>, G1H: GraphViewOps<'graph>, G2: GraphViewOps<'graph>, G2H: GraphViewOps<'graph>> PartialOrd<NodeView<G2, G2H>> for NodeView<G1, G1H>
source§impl<G, GH: CoreGraphOps + TimeSemantics> TemporalPropertiesOps for NodeView<G, GH>
impl<G, GH: CoreGraphOps + TimeSemantics> TemporalPropertiesOps for NodeView<G, GH>
source§impl<G, GH: TimeSemantics> TemporalPropertyViewOps for NodeView<G, GH>
impl<G, GH: TimeSemantics> TemporalPropertyViewOps for NodeView<G, GH>
fn temporal_value(&self, id: usize) -> Option<Prop>
fn temporal_history(&self, id: usize) -> Vec<i64>
fn temporal_history_date_time(&self, id: usize) -> Option<Vec<DateTime<Utc>>>
fn temporal_values(&self, id: usize) -> Vec<Prop>
fn temporal_value_at(&self, id: usize, t: i64) -> Option<Prop>
impl<G: Copy, GH: Copy> Copy for NodeView<G, GH>
impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> Eq for NodeView<G, GH>
impl<G, GH> Static for NodeView<G, GH>
Auto Trait Implementations§
impl<G, GH> Freeze for NodeView<G, GH>
impl<G, GH> RefUnwindSafe for NodeView<G, GH>where
G: RefUnwindSafe,
GH: RefUnwindSafe,
impl<G, GH> Send for NodeView<G, GH>
impl<G, GH> Sync for NodeView<G, GH>
impl<G, GH> Unpin for NodeView<G, GH>
impl<G, GH> UnwindSafe for NodeView<G, GH>where
G: UnwindSafe,
GH: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<'graph, V> LayerOps<'graph> for Vwhere
V: OneHopFilter<'graph> + 'graph,
impl<'graph, V> LayerOps<'graph> for Vwhere
V: OneHopFilter<'graph> + 'graph,
type LayeredViewType = <V as OneHopFilter<'graph>>::Filtered<LayeredGraph<<V as OneHopFilter<'graph>>::FilteredGraph>>
source§fn default_layer(&self) -> <V as LayerOps<'graph>>::LayeredViewType
fn default_layer(&self) -> <V as LayerOps<'graph>>::LayeredViewType
Return a graph containing only the default edge layer
source§fn layers<L>(
&self,
layers: L,
) -> Result<<V as LayerOps<'graph>>::LayeredViewType, GraphError>
fn layers<L>( &self, layers: L, ) -> Result<<V as LayerOps<'graph>>::LayeredViewType, GraphError>
Return a graph containing the layers in
names. Errors if one or more of the layers do not exists.source§fn exclude_layers<L>(
&self,
layers: L,
) -> Result<<V as LayerOps<'graph>>::LayeredViewType, GraphError>
fn exclude_layers<L>( &self, layers: L, ) -> Result<<V as LayerOps<'graph>>::LayeredViewType, GraphError>
Return a graph containing the excluded layers in
names. Errors if one or more of the layers do not exists.fn exclude_valid_layers<L>( &self, layers: L, ) -> <V as LayerOps<'graph>>::LayeredViewType
source§fn valid_layers<L>(&self, names: L) -> <V as LayerOps<'graph>>::LayeredViewType
fn valid_layers<L>(&self, names: L) -> <V as LayerOps<'graph>>::LayeredViewType
Return a graph containing the layers in
names. Any layers that do not exist are ignored.source§impl<'graph, V> NodeViewOps<'graph> for Vwhere
V: BaseNodeViewOps<'graph> + 'graph,
impl<'graph, V> NodeViewOps<'graph> for Vwhere
V: BaseNodeViewOps<'graph> + 'graph,
type BaseGraph = <V as BaseNodeViewOps<'graph>>::BaseGraph
type Graph = <V as BaseNodeViewOps<'graph>>::Graph
type ValueType<T: 'graph> = <V as BaseNodeViewOps<'graph>>::ValueType<T>
type PathType = <V as BaseNodeViewOps<'graph>>::PathType
type PropType = <V as BaseNodeViewOps<'graph>>::PropType
type Edges = <V as BaseNodeViewOps<'graph>>::Edges
source§fn name(&self) -> <V as NodeViewOps<'graph>>::ValueType<String>
fn name(&self) -> <V as NodeViewOps<'graph>>::ValueType<String>
Get the name of this node if a user has set one otherwise it returns the ID. Read more
source§fn node_type(&self) -> <V as NodeViewOps<'graph>>::ValueType<Option<ArcStr>>
fn node_type(&self) -> <V as NodeViewOps<'graph>>::ValueType<Option<ArcStr>>
Returns the type of node
fn node_type_id(&self) -> <V as NodeViewOps<'graph>>::ValueType<usize>
source§fn earliest_time(&self) -> <V as NodeViewOps<'graph>>::ValueType<Option<i64>>
fn earliest_time(&self) -> <V as NodeViewOps<'graph>>::ValueType<Option<i64>>
Get the timestamp for the earliest activity of the node
fn earliest_date_time( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<Option<DateTime<Utc>>>
source§fn latest_time(&self) -> <V as NodeViewOps<'graph>>::ValueType<Option<i64>>
fn latest_time(&self) -> <V as NodeViewOps<'graph>>::ValueType<Option<i64>>
Get the timestamp for the latest activity of the node
fn latest_date_time( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<Option<DateTime<Utc>>>
source§fn history(&self) -> <V as NodeViewOps<'graph>>::ValueType<Vec<i64>>
fn history(&self) -> <V as NodeViewOps<'graph>>::ValueType<Vec<i64>>
Gets the history of the node (time that the node was added and times when changes were made to the node)
source§fn history_date_time(
&self,
) -> <V as NodeViewOps<'graph>>::ValueType<Option<Vec<DateTime<Utc>>>>
fn history_date_time( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<Option<Vec<DateTime<Utc>>>>
Gets the history of the node (time that the node was added and times when changes were made to the node) as
DateTime<Utc> objects if parseablesource§fn properties(
&self,
) -> <V as NodeViewOps<'graph>>::ValueType<Properties<<V as NodeViewOps<'graph>>::PropType>>
fn properties( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<Properties<<V as NodeViewOps<'graph>>::PropType>>
Get a view of the temporal properties of this node. Read more
source§fn degree(&self) -> <V as NodeViewOps<'graph>>::ValueType<usize>
fn degree(&self) -> <V as NodeViewOps<'graph>>::ValueType<usize>
Get the degree of this node (i.e., the number of edges that are incident to it). Read more
source§fn in_degree(&self) -> <V as NodeViewOps<'graph>>::ValueType<usize>
fn in_degree(&self) -> <V as NodeViewOps<'graph>>::ValueType<usize>
Get the in-degree of this node (i.e., the number of edges that point into it). Read more
source§fn out_degree(&self) -> <V as NodeViewOps<'graph>>::ValueType<usize>
fn out_degree(&self) -> <V as NodeViewOps<'graph>>::ValueType<usize>
Get the out-degree of this node (i.e., the number of edges that point out of it). Read more
source§fn edges(&self) -> <V as NodeViewOps<'graph>>::Edges
fn edges(&self) -> <V as NodeViewOps<'graph>>::Edges
Get the edges that are incident to this node. Read more
source§fn in_edges(&self) -> <V as NodeViewOps<'graph>>::Edges
fn in_edges(&self) -> <V as NodeViewOps<'graph>>::Edges
Get the edges that point into this node. Read more
source§fn out_edges(&self) -> <V as NodeViewOps<'graph>>::Edges
fn out_edges(&self) -> <V as NodeViewOps<'graph>>::Edges
Get the edges that point out of this node. Read more
source§fn neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType
fn neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType
Get the neighbours of this node. Read more
source§fn in_neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType
fn in_neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType
Get the neighbours of this node that point into this node. Read more
source§fn out_neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType
fn out_neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType
Get the neighbours of this node that point out of this node. Read more
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<'graph, V> ResetFilter<'graph> for Vwhere
V: BaseNodeViewOps<'graph> + OneHopFilter<'graph>,
impl<'graph, V> ResetFilter<'graph> for Vwhere
V: BaseNodeViewOps<'graph> + OneHopFilter<'graph>,
fn reset_filter(&self) -> Self::Filtered<Self::BaseGraph>
source§impl<'graph, V> TimeOps<'graph> for Vwhere
V: OneHopFilter<'graph> + 'graph,
impl<'graph, V> TimeOps<'graph> for Vwhere
V: OneHopFilter<'graph> + 'graph,
type WindowedViewType = <V as InternalTimeOps<'graph>>::InternalWindowedViewType
source§fn start(&self) -> Option<i64>
fn start(&self) -> Option<i64>
Return the timestamp of the start of the view or None if the view start is unbounded.
source§fn end(&self) -> Option<i64>
fn end(&self) -> Option<i64>
Return the timestamp of the of the view or None if the view end is unbounded.
fn start_date_time(&self) -> Option<DateTime<Utc>>
fn end_date_time(&self) -> Option<DateTime<Utc>>
source§fn shrink_start<T: IntoTime>(&self, start: T) -> Self::WindowedViewType
fn shrink_start<T: IntoTime>(&self, start: T) -> Self::WindowedViewType
set the start of the window to the larger of
start and self.start()source§fn shrink_end<T: IntoTime>(&self, end: T) -> Self::WindowedViewType
fn shrink_end<T: IntoTime>(&self, end: T) -> Self::WindowedViewType
set the end of the window to the smaller of
end and self.end()source§fn shrink_window<T: IntoTime>(&self, start: T, end: T) -> Self::WindowedViewType
fn shrink_window<T: IntoTime>(&self, start: T, end: T) -> Self::WindowedViewType
shrink both the start and end of the window (same as calling
shrink_start followed by shrink_end but more efficient)source§fn window_size(&self) -> Option<u64>
fn window_size(&self) -> Option<u64>
Return the size of the window covered by this view or None if the window is unbounded
source§fn window<T1: IntoTime, T2: IntoTime>(
&self,
start: T1,
end: T2,
) -> Self::WindowedViewType
fn window<T1: IntoTime, T2: IntoTime>( &self, start: T1, end: T2, ) -> Self::WindowedViewType
Create a view including all events between
start (inclusive) and end (exclusive)source§fn at<T: IntoTime>(&self, time: T) -> Self::WindowedViewType
fn at<T: IntoTime>(&self, time: T) -> Self::WindowedViewType
Create a view that only includes events at
timesource§fn after<T: IntoTime>(&self, start: T) -> Self::WindowedViewType
fn after<T: IntoTime>(&self, start: T) -> Self::WindowedViewType
Create a view that only includes events after
start (exclusive)source§fn before<T: IntoTime>(&self, end: T) -> Self::WindowedViewType
fn before<T: IntoTime>(&self, end: T) -> Self::WindowedViewType
Create a view that only includes events before
end (exclusive)source§fn expanding<I>(
&self,
step: I,
) -> Result<WindowSet<'graph, Self>, ParseTimeError>
fn expanding<I>( &self, step: I, ) -> Result<WindowSet<'graph, Self>, ParseTimeError>
Creates a
using an expanding window. The last window may fall partially outside the range of the data/view. Read more
WindowSet with the given step sizeusing an expanding window. The last window may fall partially outside the range of the data/view. Read more