Struct graphannis_core::annostorage::Match
source · pub struct Match {
pub node: NodeID,
pub anno_key: Arc<AnnoKey>,
}
Expand description
A match is the result of a query on an annotation storage.
Fields§
§node: NodeID
The node identifier this match refers to.
anno_key: Arc<AnnoKey>
The qualified annotation name.
Implementations§
source§impl Match
impl Match
sourcepub fn extract_annotation(
&self,
node_annos: &dyn NodeAnnotationStorage
) -> Result<Option<Annotation>>
pub fn extract_annotation( &self, node_annos: &dyn NodeAnnotationStorage ) -> Result<Option<Annotation>>
Extract the annotation for this match . The annotation value
is retrieved from the node_annos
given as argument.
sourcepub fn different_to_all(&self, other: &[Match]) -> bool
pub fn different_to_all(&self, other: &[Match]) -> bool
Returns true if this match is different to all the other matches given as argument.
A single match is different if the node ID or the annotation key are different.
sourcepub fn different_to(&self, other: &Match) -> bool
pub fn different_to(&self, other: &Match) -> bool
Returns true if this match is different to the other match given as argument.
A single match is different if the node ID or the annotation key are different.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Match
impl<'de> Deserialize<'de> for Match
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Match
impl Ord for Match
source§impl PartialEq for Match
impl PartialEq for Match
source§impl PartialOrd for Match
impl PartialOrd for Match
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Match
impl StructuralPartialEq for Match
Auto Trait Implementations§
impl Freeze for Match
impl RefUnwindSafe for Match
impl Send for Match
impl Sync for Match
impl Unpin for Match
impl UnwindSafe for Match
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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