pub struct Properties<P: PropertiesOps + Clone> { /* private fields */ }Expand description
View of the properties of an entity (graph|node|edge)
Implementations§
Source§impl<P: PropertiesOps + Clone> Properties<P>
impl<P: PropertiesOps + Clone> Properties<P>
pub fn new(props: P) -> Properties<P>
Sourcepub fn get(&self, key: &str) -> Option<Prop>
pub fn get(&self, key: &str) -> Option<Prop>
Get property value.
First searches temporal properties and returns latest value if it exists. If not, it falls back to static properties.
pub fn get_by_id(&self, id: usize) -> Option<Prop>
Sourcepub fn iter(&self) -> impl Iterator<Item = (ArcStr, Prop)> + '_
pub fn iter(&self) -> impl Iterator<Item = (ArcStr, Prop)> + '_
Iterate over all property key-value pairs
Sourcepub fn temporal(&self) -> TemporalProperties<P>
pub fn temporal(&self) -> TemporalProperties<P>
Get a view of the temporal properties only.
Sourcepub fn constant<'a>(&self) -> ConstProperties<'a, P>
pub fn constant<'a>(&self) -> ConstProperties<'a, P>
Get a view of the constant properties (meta-data) only.
Trait Implementations§
Source§impl<P: Clone + PropertiesOps + Clone> Clone for Properties<P>
impl<P: Clone + PropertiesOps + Clone> Clone for Properties<P>
Source§fn clone(&self) -> Properties<P>
fn clone(&self) -> Properties<P>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Debug + PropertiesOps + Clone> Debug for Properties<P>
impl<P: Debug + PropertiesOps + Clone> Debug for Properties<P>
Source§impl From<Properties<DynamicGraph>> for DynProperties
impl From<Properties<DynamicGraph>> for DynProperties
Source§fn from(value: Properties<DynamicGraph>) -> Self
fn from(value: Properties<DynamicGraph>) -> Self
Converts to this type from the input type.
Source§impl<P: PropertiesOps + Clone + Send + Sync + Static + 'static> From<Properties<P>> for DynProperties
impl<P: PropertiesOps + Clone + Send + Sync + Static + 'static> From<Properties<P>> for DynProperties
Source§fn from(value: Properties<P>) -> Self
fn from(value: Properties<P>) -> Self
Converts to this type from the input type.
Source§impl<'a, P: PropertiesOps + Clone + 'a> IntoIterator for &'a Properties<P>
impl<'a, P: PropertiesOps + Clone + 'a> IntoIterator for &'a Properties<P>
Source§impl<P: PropertiesOps + Clone> IntoIterator for Properties<P>
impl<P: PropertiesOps + Clone> IntoIterator for Properties<P>
Auto Trait Implementations§
impl<P> Freeze for Properties<P>where
P: Freeze,
impl<P> RefUnwindSafe for Properties<P>where
P: RefUnwindSafe,
impl<P> Send for Properties<P>
impl<P> Sync for Properties<P>
impl<P> Unpin for Properties<P>where
P: Unpin,
impl<P> UnwindSafe for Properties<P>where
P: 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§impl<S, P, PI> CollectProperties for PI
impl<S, P, PI> CollectProperties for PI
fn collect_properties<F>( self, id_resolver: F, ) -> Result<Vec<(usize, Prop)>, GraphError>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more