Struct raphtory::db::graph::node::NodeView

source ·
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: VID

Implementations§

source§

impl<'a, G: Clone, GH: Clone> NodeView<&'a G, &'a GH>

source

pub fn cloned(&self) -> NodeView<G, GH>

source§

impl<'graph, G: GraphViewOps<'graph>> NodeView<G>

source

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>

source

pub fn new_one_hop_filtered(base_graph: G, graph: GH, node: VID) -> Self

source§

impl<G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps> NodeView<G, G>

source

pub fn add_constant_properties<C: CollectProperties>( &self, props: C, ) -> Result<(), GraphError>

source

pub fn set_node_type(&self, new_type: &str) -> Result<(), GraphError>

source

pub fn update_constant_properties<C: CollectProperties>( &self, props: C, ) -> Result<(), GraphError>

source

pub fn add_updates<C: CollectProperties, T: TryIntoInputTime>( &self, time: T, props: C, ) -> Result<(), GraphError>

Trait Implementations§

source§

impl<G, GH> AsNodeRef for NodeView<G, GH>

source§

fn as_node_ref(&self) -> NodeRef<'_>

source§

fn into_gid(self) -> Either<GID, VID>
where Self: Sized,

source§

fn as_gid_ref(&self) -> Either<GidRef<'_>, VID>

source§

impl<G: Clone, GH: Clone> Clone for NodeView<G, GH>

source§

fn clone(&self) -> NodeView<G, GH>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<G, GH: CoreGraphOps> ConstPropertiesOps for NodeView<G, GH>

source§

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)
source§

fn get_const_prop_name(&self, id: usize) -> ArcStr

source§

fn const_prop_ids(&self) -> Box<dyn Iterator<Item = usize> + '_>

source§

fn get_const_prop(&self, id: usize) -> Option<Prop>

source§

fn const_prop_keys(&self) -> Box<dyn Iterator<Item = ArcStr> + '_>

source§

fn const_prop_values(&self) -> Vec<Prop>

source§

impl<'graph, G, GH: GraphViewOps<'graph> + Debug> Debug for NodeView<G, GH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'graph, G, GH: GraphViewOps<'graph>> Display for NodeView<G, GH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<G, GH: CoreGraphOps> Hash for NodeView<G, GH>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> OneHopFilter<'graph> for NodeView<G, GH>

source§

type BaseGraph = G

source§

type FilteredGraph = GH

source§

type Filtered<GHH: GraphViewOps<'graph>> = NodeView<G, GHH>

source§

fn current_filter(&self) -> &Self::FilteredGraph

source§

fn base_graph(&self) -> &Self::BaseGraph

source§

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>

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<G1: CoreGraphOps, G1H, G2: CoreGraphOps, G2H> PartialEq<NodeView<G2, G2H>> for NodeView<G1, G1H>

source§

fn eq(&self, other: &NodeView<G2, G2H>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'graph, G1: GraphViewOps<'graph>, G1H: GraphViewOps<'graph>, G2: GraphViewOps<'graph>, G2H: GraphViewOps<'graph>> PartialOrd<NodeView<G2, G2H>> for NodeView<G1, G1H>

source§

fn partial_cmp(&self, other: &NodeView<G2, G2H>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<G, GH: CoreGraphOps + TimeSemantics> TemporalPropertiesOps for NodeView<G, GH>

source§

fn get_temporal_prop_id(&self, name: &str) -> Option<usize>

source§

fn get_temporal_prop_name(&self, id: usize) -> ArcStr

source§

fn temporal_prop_ids(&self) -> Box<dyn Iterator<Item = usize> + '_>

source§

fn temporal_prop_keys(&self) -> Box<dyn Iterator<Item = ArcStr> + '_>

source§

impl<G, GH: TimeSemantics> TemporalPropertyViewOps for NodeView<G, GH>

source§

impl<G: Copy, GH: Copy> Copy for NodeView<G, GH>

source§

impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>> Eq for NodeView<G, GH>

source§

impl<G, GH> Static for NodeView<G, GH>

Auto Trait Implementations§

§

impl<G, GH> Freeze for NodeView<G, GH>
where G: Freeze, GH: Freeze,

§

impl<G, GH> RefUnwindSafe for NodeView<G, GH>

§

impl<G, GH> Send for NodeView<G, GH>
where G: Send, GH: Send,

§

impl<G, GH> Sync for NodeView<G, GH>
where G: Sync, GH: Sync,

§

impl<G, GH> Unpin for NodeView<G, GH>
where G: Unpin, GH: Unpin,

§

impl<G, GH> UnwindSafe for NodeView<G, GH>
where G: UnwindSafe, GH: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AsOrd<T> for T
where T: Ord,

source§

fn as_ord(&self) -> &T

Converts reference of this type into reference of an ordered Type. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

impl<'graph, V> LayerOps<'graph> for V
where V: OneHopFilter<'graph> + 'graph,

source§

type LayeredViewType = <V as OneHopFilter<'graph>>::Filtered<LayeredGraph<<V as OneHopFilter<'graph>>::FilteredGraph>>

source§

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>
where L: Into<Layer>,

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>
where L: Into<Layer>,

Return a graph containing the excluded layers in names. Errors if one or more of the layers do not exists.
source§

fn exclude_valid_layers<L>( &self, layers: L, ) -> <V as LayerOps<'graph>>::LayeredViewType
where L: Into<Layer>,

source§

fn has_layer(&self, name: &str) -> bool

Check if name is a valid layer name
source§

fn valid_layers<L>(&self, names: L) -> <V as LayerOps<'graph>>::LayeredViewType
where L: Into<Layer>,

Return a graph containing the layers in names. Any layers that do not exist are ignored.
source§

impl<'graph, V> NodeViewOps<'graph> for V
where V: BaseNodeViewOps<'graph> + 'graph,

source§

type BaseGraph = <V as BaseNodeViewOps<'graph>>::BaseGraph

source§

type Graph = <V as BaseNodeViewOps<'graph>>::Graph

source§

type ValueType<T: 'graph> = <V as BaseNodeViewOps<'graph>>::ValueType<T>

source§

type PathType = <V as BaseNodeViewOps<'graph>>::PathType

source§

type PropType = <V as BaseNodeViewOps<'graph>>::PropType

source§

type Edges = <V as BaseNodeViewOps<'graph>>::Edges

source§

fn id(&self) -> <V as NodeViewOps<'graph>>::ValueType<GID>

Get the numeric id of the node
source§

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>>

Returns the type of node
source§

fn node_type_id(&self) -> <V as NodeViewOps<'graph>>::ValueType<usize>

source§

fn earliest_time(&self) -> <V as NodeViewOps<'graph>>::ValueType<Option<i64>>

Get the timestamp for the earliest activity of the node
source§

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>>

Get the timestamp for the latest activity of the node
source§

fn latest_date_time( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<Option<DateTime<Utc>>>

source§

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>>>>

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 parseable
source§

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>

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>

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>

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

Get the edges that are incident to this node. Read more
source§

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

Get the edges that point out of this node. Read more
source§

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

Get the neighbours of this node that point into this node. Read more
source§

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

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<'graph, V> ResetFilter<'graph> for V
where V: BaseNodeViewOps<'graph> + OneHopFilter<'graph>,

source§

fn reset_filter(&self) -> Self::Filtered<Self::BaseGraph>

source§

impl<'graph, V> TimeOps<'graph> for V
where V: OneHopFilter<'graph> + 'graph,

source§

type WindowedViewType = <V as InternalTimeOps<'graph>>::InternalWindowedViewType

source§

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>

Return the timestamp of the of the view or None if the view end is unbounded.
source§

fn start_date_time(&self) -> Option<DateTime<Utc>>

source§

fn end_date_time(&self) -> Option<DateTime<Utc>>

source§

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

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

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>

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

Create a view including all events between start (inclusive) and end (exclusive)
source§

fn at<T: IntoTime>(&self, time: T) -> Self::WindowedViewType

Create a view that only includes events at time
source§

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

Create a view that only includes events before end (exclusive)
source§

fn expanding<I>( &self, step: I, ) -> Result<WindowSet<'graph, Self>, ParseTimeError>
where Self: Sized + Clone + 'static, I: TryInto<Interval, Error = ParseTimeError>,

Creates a WindowSet with the given step size
using an expanding window. The last window may fall partially outside the range of the data/view. Read more
source§

fn rolling<I>( &self, window: I, step: Option<I>, ) -> Result<WindowSet<'graph, Self>, ParseTimeError>
where Self: Sized + Clone + 'static, I: TryInto<Interval, Error = ParseTimeError>,

Creates a WindowSet with the given window size and optional step using a rolling window. The last window may fall partially outside the range of the data/view. Read more
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<P> PropertiesOps for P

source§

impl<T> StateType for T
where T: PartialEq + Clone + Debug + Send + Sync + 'static,