Skip to main content

graphrecords_query/traits/
structure.rs

1use graphrecords_core::{graphrecord::Group, prelude::GraphRecordAttribute};
2
3pub trait Attribute {
4    type ReturnOperand;
5
6    fn attribute(&self, attribute: GraphRecordAttribute) -> Self::ReturnOperand;
7}
8
9pub trait Attributes {
10    type ReturnOperand;
11
12    fn attributes(&self) -> Self::ReturnOperand;
13}
14
15pub trait HasAttribute {
16    type ReturnOperand;
17
18    fn has_attribute(&self, attribute: GraphRecordAttribute) -> Self::ReturnOperand;
19}
20
21pub trait InGroup {
22    type ReturnOperand;
23
24    fn in_group(&self, group: Group) -> Self::ReturnOperand;
25}
26
27pub trait Filter<M> {
28    type ReturnOperand;
29
30    fn filter(&self, mask: M) -> Self::ReturnOperand;
31}