pub struct KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> { /* private fields */ }Expand description
Foreign-free rows referencing one left and one right caller-keyed roster.
Rows retain authored order and may be empty or repeated until a caller-selected posture informs those questions.
Implementations§
Source§impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
Sourcepub const fn left(&self) -> &'rosters KeyedRoster<Left, LeftKey, LEFT>
pub const fn left(&self) -> &'rosters KeyedRoster<Left, LeftKey, LEFT>
The left roster every row was resolved against.
Sourcepub const fn right(&self) -> &'rosters KeyedRoster<Right, RightKey, RIGHT>
pub const fn right(&self) -> &'rosters KeyedRoster<Right, RightKey, RIGHT>
The right roster every row was resolved against.
Sourcepub fn indexed(
&self,
) -> impl Iterator<Item = (usize, &LeftKey, &Left, &RightKey, &Right, &Payload)>
pub fn indexed( &self, ) -> impl Iterator<Item = (usize, &LeftKey, &Left, &RightKey, &Right, &Payload)>
Reads every authored row with both resolved roster members and its caller-owned payload.
Sourcepub fn at(
&self,
index: usize,
) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>
pub fn at( &self, index: usize, ) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>
Reads one authored row at a checked position.
Sourcepub fn canonical_indices(&self) -> &[usize]
pub fn canonical_indices(&self) -> &[usize]
The authored row indices in canonical left-position then right-position order.
Equal endpoint pairs retain authored order until duplicate posture is settled.
Sourcepub fn canonical_at(
&self,
index: usize,
) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>
pub fn canonical_at( &self, index: usize, ) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>
Reads one row by its canonical-order position.
Sourcepub fn payloads_for<'reading, LeftQuery, RightQuery>(
&'reading self,
left: &LeftQuery,
right: &RightQuery,
) -> impl Iterator<Item = &'reading Payload>
pub fn payloads_for<'reading, LeftQuery, RightQuery>( &'reading self, left: &LeftQuery, right: &RightQuery, ) -> impl Iterator<Item = &'reading Payload>
Reads every payload under one pair of borrowed roster keys.
Sourcepub fn distinct(
self,
) -> Result<KeyedRosterRelation<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>, RepeatedRelationPairs<ROWS>>
pub fn distinct( self, ) -> Result<KeyedRosterRelation<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>, RepeatedRelationPairs<ROWS>>
Promote these foreign-free rows into a relation where every endpoint pair occurs once.
§Errors
Returns every distinct repeated endpoint pair with its first and later authored positions.
Source§impl<'rosters, Left, LeftKey: Eq, Right, RightKey: Eq, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
impl<'rosters, Left, LeftKey: Eq, Right, RightKey: Eq, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
Sourcepub fn referenced(
left: &'rosters KeyedRoster<Left, LeftKey, LEFT>,
right: &'rosters KeyedRoster<Right, RightKey, RIGHT>,
payloads: Vec<Payload>,
left_key_of: impl FnMut(&Payload) -> LeftKey,
right_key_of: impl FnMut(&Payload) -> RightKey,
) -> Result<Self, KeyedRosterRowsError<LeftKey, RightKey, ROWS>>
pub fn referenced( left: &'rosters KeyedRoster<Left, LeftKey, LEFT>, right: &'rosters KeyedRoster<Right, RightKey, RIGHT>, payloads: Vec<Payload>, left_key_of: impl FnMut(&Payload) -> LeftKey, right_key_of: impl FnMut(&Payload) -> RightKey, ) -> Result<Self, KeyedRosterRowsError<LeftKey, RightKey, ROWS>>
Resolve one complete row offering against two existing keyed rosters.
Row magnitude is settled before either endpoint projection runs. Every left reference is settled before the right projection begins.
§Errors
Returns row overflow, every foreign left reference, or every foreign right reference under that precedence.
Source§impl<Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> KeyedRosterRows<'_, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
impl<Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> KeyedRosterRows<'_, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
Sourcepub fn at_in(
&self,
order: RowOrder,
index: usize,
) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>
pub fn at_in( &self, order: RowOrder, index: usize, ) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>
Reads one row under the caller-selected stable order.
Sourcepub fn occupancy_standing(&self) -> OccupancyStanding
pub fn occupancy_standing(&self) -> OccupancyStanding
Whether this relation holds no row or at least one.
Sourcepub fn repetition_standing(&self) -> RepetitionStanding
pub fn repetition_standing(&self) -> RepetitionStanding
Whether every endpoint pair occurs once or at least one pair repeats.
Sourcepub fn left_completeness(&self) -> CompletenessStanding
pub fn left_completeness(&self) -> CompletenessStanding
Whether every left-roster member occurs in at least one row.
Sourcepub fn right_completeness(&self) -> CompletenessStanding
pub fn right_completeness(&self) -> CompletenessStanding
Whether every right-roster member occurs in at least one row.
Sourcepub fn density_standing(&self) -> DensityStanding
pub fn density_standing(&self) -> DensityStanding
Whether every pair in the left-by-right roster product occurs in at least one row.
Source§impl<Member, Key, Payload, const MEMBERS: usize, const ROWS: usize> KeyedRosterRows<'_, Member, Key, Member, Key, Payload, MEMBERS, MEMBERS, ROWS>
impl<Member, Key, Payload, const MEMBERS: usize, const ROWS: usize> KeyedRosterRows<'_, Member, Key, Member, Key, Payload, MEMBERS, MEMBERS, ROWS>
Sourcepub fn roster_relation_standing(&self) -> RosterRelationStanding
pub fn roster_relation_standing(&self) -> RosterRelationStanding
Whether both relation sides borrow the same roster instance.
Sourcepub fn self_relation_standing(
&self,
) -> Result<SelfRelationStanding, SameRosterRequired>
pub fn self_relation_standing( &self, ) -> Result<SelfRelationStanding, SameRosterRequired>
Whether at least one row relates a member to itself.
§Errors
Returns a typed refusal when the relation sides borrow different roster instances.
Sourcepub fn cycle_standing(&self) -> Result<CycleStanding, SameRosterRequired>
pub fn cycle_standing(&self) -> Result<CycleStanding, SameRosterRequired>
Whether this same-roster directed relation contains a cycle.
§Errors
Returns a typed refusal when the relation sides borrow different roster instances.
Source§impl<Member, Key: Eq, Payload, const MEMBERS: usize, const ROWS: usize> KeyedRosterRows<'_, Member, Key, Member, Key, Payload, MEMBERS, MEMBERS, ROWS>
impl<Member, Key: Eq, Payload, const MEMBERS: usize, const ROWS: usize> KeyedRosterRows<'_, Member, Key, Member, Key, Payload, MEMBERS, MEMBERS, ROWS>
Sourcepub fn reachability_from(
&self,
root: Key,
) -> Result<Reachability<MEMBERS>, ReachabilityError<Key>>
pub fn reachability_from( &self, root: Key, ) -> Result<Reachability<MEMBERS>, ReachabilityError<Key>>
Partitions one shared roster into members reachable and unreachable from a declared root.
Both partitions follow roster order rather than traversal order.
§Errors
Returns a typed refusal when the relation sides borrow different roster instances or when the root is outside that roster.
Trait Implementations§
Source§impl<'rosters, Left: Clone, LeftKey: Clone, Right: Clone, RightKey: Clone, Payload: Clone, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Clone for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
impl<'rosters, Left: Clone, LeftKey: Clone, Right: Clone, RightKey: Clone, Payload: Clone, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Clone for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
Source§fn clone(
&self,
) -> KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
fn clone( &self, ) -> KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more