pub struct Attributes { /* private fields */ }Expand description
The attribute relationships of every concept.
Implementations§
Source§impl Attributes
impl Attributes
Sourcepub fn build(
nodes: u32,
types: Vec<u64>,
edges: Vec<Edge>,
) -> Result<Self, AttributesError>
pub fn build( nodes: u32, types: Vec<u64>, edges: Vec<Edge>, ) -> Result<Self, AttributesError>
Builds the attributes of nodes concepts from edges, whose types
index types.
§Errors
Returns AttributesError::OutOfRange for a row beyond nodes or
beyond the type list, and AttributesError::TooMany past u32.
Sourcepub fn rows(&self, source: Ordinal) -> impl Iterator<Item = Row<'_>> + '_
pub fn rows(&self, source: Ordinal) -> impl Iterator<Item = Row<'_>> + '_
The rows of source, sorted by group, then type, then value.
Sourcepub fn sources(&self, kind: u32, target: Ordinal) -> &[u32]
pub fn sources(&self, kind: u32, target: Ordinal) -> &[u32]
The sources with a relationship of type kind to target, sorted.
Sourcepub fn sources_of_kind(&self, kind: u32) -> Option<&RoaringBitmap>
pub fn sources_of_kind(&self, kind: u32) -> Option<&RoaringBitmap>
Every source with a relationship of type kind, whatever its value.
Sourcepub fn targets_of_kind(&self, kind: u32) -> &[u32]
pub fn targets_of_kind(&self, kind: u32) -> &[u32]
The destination concepts of type kind, sorted.
Sourcepub fn read_from(input: &mut impl Read) -> Result<Self, AttributesError>
pub fn read_from(input: &mut impl Read) -> Result<Self, AttributesError>
Reads the layout and derives the inverted index.
§Errors
Returns AttributesError for a truncated, inconsistent, or foreign
artifact.
Trait Implementations§
Source§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Attributes
impl Debug for Attributes
Source§impl Default for Attributes
impl Default for Attributes
Source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
impl Eq for Attributes
Source§impl PartialEq for Attributes
impl PartialEq for Attributes
impl StructuralPartialEq for Attributes
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnsafeUnpin for Attributes
impl UnwindSafe for Attributes
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