Skip to main content

KeyedRosterRows

Struct KeyedRosterRows 

Source
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>

Source

pub const fn left(&self) -> &'rosters KeyedRoster<Left, LeftKey, LEFT>

The left roster every row was resolved against.

Source

pub const fn right(&self) -> &'rosters KeyedRoster<Right, RightKey, RIGHT>

The right roster every row was resolved against.

Source

pub fn count(&self) -> usize

How many foreign-free rows are held.

Source

pub fn is_empty(&self) -> bool

Whether no relation row was declared.

Source

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.

Source

pub fn at( &self, index: usize, ) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>

Reads one authored row at a checked position.

Source

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.

Source

pub fn canonical_at( &self, index: usize, ) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>

Reads one row by its canonical-order position.

Source

pub fn payloads_for<'reading, LeftQuery, RightQuery>( &'reading self, left: &LeftQuery, right: &RightQuery, ) -> impl Iterator<Item = &'reading Payload>
where LeftKey: Borrow<LeftQuery>, LeftQuery: Eq + ?Sized, RightKey: Borrow<RightQuery>, RightQuery: Eq + ?Sized,

Reads every payload under one pair of borrowed roster keys.

Source

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>

Source

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>

Source

pub fn at_in( &self, order: RowOrder, index: usize, ) -> Option<(&LeftKey, &Left, &RightKey, &Right, &Payload)>

Reads one row under the caller-selected stable order.

Source

pub fn occupancy_standing(&self) -> OccupancyStanding

Whether this relation holds no row or at least one.

Source

pub fn repetition_standing(&self) -> RepetitionStanding

Whether every endpoint pair occurs once or at least one pair repeats.

Source

pub fn left_completeness(&self) -> CompletenessStanding

Whether every left-roster member occurs in at least one row.

Source

pub fn right_completeness(&self) -> CompletenessStanding

Whether every right-roster member occurs in at least one row.

Source

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>

Source

pub fn roster_relation_standing(&self) -> RosterRelationStanding

Whether both relation sides borrow the same roster instance.

Source

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.

Source

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>

Source

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>

Source§

fn clone( &self, ) -> KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'rosters, Left: Debug, LeftKey: Debug, Right: Debug, RightKey: Debug, Payload: Debug, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Debug for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'rosters, Left: Eq, LeftKey: Eq, Right: Eq, RightKey: Eq, Payload: Eq, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Eq for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>

Source§

impl<'rosters, Left: Hash, LeftKey: Hash, Right: Hash, RightKey: Hash, Payload: Hash, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Hash for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'rosters, Left: PartialEq, LeftKey: PartialEq, Right: PartialEq, RightKey: PartialEq, Payload: PartialEq, const LEFT: usize, const RIGHT: usize, const ROWS: usize> PartialEq for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>

Source§

fn eq( &self, other: &KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>, ) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'rosters, Left: PartialEq, LeftKey: PartialEq, Right: PartialEq, RightKey: PartialEq, Payload: PartialEq, const LEFT: usize, const RIGHT: usize, const ROWS: usize> StructuralPartialEq for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>

Auto Trait Implementations§

§

impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Freeze for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
where &'rosters KeyedRoster<Left, LeftKey, LEFT>: Freeze, &'rosters KeyedRoster<Right, RightKey, RIGHT>: Freeze, Bounded<ReferencedRosterRow<'rosters, Left, LeftKey, Right, RightKey, Payload>, ROWS>: Freeze, Bounded<usize, ROWS>: Freeze,

§

impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> RefUnwindSafe for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
where &'rosters KeyedRoster<Left, LeftKey, LEFT>: RefUnwindSafe, &'rosters KeyedRoster<Right, RightKey, RIGHT>: RefUnwindSafe, Bounded<ReferencedRosterRow<'rosters, Left, LeftKey, Right, RightKey, Payload>, ROWS>: RefUnwindSafe, Bounded<usize, ROWS>: RefUnwindSafe,

§

impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Send for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
where &'rosters KeyedRoster<Left, LeftKey, LEFT>: Send, &'rosters KeyedRoster<Right, RightKey, RIGHT>: Send, Bounded<ReferencedRosterRow<'rosters, Left, LeftKey, Right, RightKey, Payload>, ROWS>: Send, Bounded<usize, ROWS>: Send,

§

impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Sync for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
where &'rosters KeyedRoster<Left, LeftKey, LEFT>: Sync, &'rosters KeyedRoster<Right, RightKey, RIGHT>: Sync, Bounded<ReferencedRosterRow<'rosters, Left, LeftKey, Right, RightKey, Payload>, ROWS>: Sync, Bounded<usize, ROWS>: Sync,

§

impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> Unpin for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
where &'rosters KeyedRoster<Left, LeftKey, LEFT>: Unpin, &'rosters KeyedRoster<Right, RightKey, RIGHT>: Unpin, Bounded<ReferencedRosterRow<'rosters, Left, LeftKey, Right, RightKey, Payload>, ROWS>: Unpin, Bounded<usize, ROWS>: Unpin,

§

impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> UnsafeUnpin for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
where &'rosters KeyedRoster<Left, LeftKey, LEFT>: UnsafeUnpin, &'rosters KeyedRoster<Right, RightKey, RIGHT>: UnsafeUnpin, Bounded<ReferencedRosterRow<'rosters, Left, LeftKey, Right, RightKey, Payload>, ROWS>: UnsafeUnpin, Bounded<usize, ROWS>: UnsafeUnpin,

§

impl<'rosters, Left, LeftKey, Right, RightKey, Payload, const LEFT: usize, const RIGHT: usize, const ROWS: usize> UnwindSafe for KeyedRosterRows<'rosters, Left, LeftKey, Right, RightKey, Payload, LEFT, RIGHT, ROWS>
where &'rosters KeyedRoster<Left, LeftKey, LEFT>: UnwindSafe, &'rosters KeyedRoster<Right, RightKey, RIGHT>: UnwindSafe, Bounded<ReferencedRosterRow<'rosters, Left, LeftKey, Right, RightKey, Payload>, ROWS>: UnwindSafe, Bounded<usize, ROWS>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.