Skip to main content

RelationIncidenceCount

Trait RelationIncidenceCount 

Source
pub trait RelationIncidenceCount: IncidenceBase {
    // Required method
    fn relation_incidence_count(&self, relation: Self::RelationId) -> usize;
}
Expand description

Exact relation-incidence count capability.

This pairs with RelationIncidences for backends that can report a relation’s incidence count without traversal. The trait does not require traversal support by itself.

§Performance

Expected O(1) unless the implementation documents otherwise.

Required Methods§

Source

fn relation_incidence_count(&self, relation: Self::RelationId) -> usize

Returns the number of incidences attached to relation.

§Performance

Expected O(1) unless the implementation documents otherwise.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§