pub struct RenderedProjection<R: Role> { /* private fields */ }Expand description
Everything one renderer produced for one plan.
Structurally non-empty: a rendering that materialized nothing is not a rendering, and no plan can ever close over one. Bounded by the magnitude a plan declares its membership inside, because a rendering wider than any plan could declare has no plan to close over.
Implementations§
Source§impl<R: Role> RenderedProjection<R>
impl<R: Role> RenderedProjection<R>
Sourcepub fn of_one(unit: RenderedUnit<R>) -> Self
pub fn of_one(unit: RenderedUnit<R>) -> Self
The one-unit rendering. Total: one unit always fits.
Sourcepub fn materialized(units: Vec<RenderedUnit<R>>) -> Result<Self, RenderError>
pub fn materialized(units: Vec<RenderedUnit<R>>) -> Result<Self, RenderError>
The several-unit rendering.
§Errors
Returns RenderError::NothingRendered where no unit was offered, and RenderError::UnitsUnbounded where the rendering outgrows MEMBERSHIP_LIMIT — the two counts read off the collection that refused rather than restated here.
Sourcepub fn first(&self) -> &RenderedUnit<R>
pub fn first(&self) -> &RenderedUnit<R>
The guaranteed first unit.
Sourcepub fn units(&self) -> &NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>
pub fn units(&self) -> &NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>
The rendered units, in the order the renderer produced them; structurally at least one.
Sourcepub fn under(&self, role: R) -> Option<&RenderedUnit<R>>
pub fn under(&self, role: R) -> Option<&RenderedUnit<R>>
The unit rendered under one seat, where one was.
Sourcepub fn units_under(&self, role: R) -> impl Iterator<Item = &RenderedUnit<R>>
pub fn units_under(&self, role: R) -> impl Iterator<Item = &RenderedUnit<R>>
Every unit rendered under one seat, in rendering order.
The road a set comparison walks: comparing two renderings by their first unit per seat would agree about two renderings that differ in their second, which is exactly what a doubled seat produces.
Sourcepub fn count_under(&self, role: R) -> usize
pub fn count_under(&self, role: R) -> usize
How many units were rendered under one seat.
Sourcepub fn units_to(
&self,
destination: Destination,
) -> impl Iterator<Item = &RenderedUnit<R>>
pub fn units_to( &self, destination: Destination, ) -> impl Iterator<Item = &RenderedUnit<R>>
Every unit this rendering materialized into one delivery, in ROSTER order.
A unit reaches a delivery through its seat’s own constant answer, so this road elects nothing and interprets nothing.
§Ordering
Roster order and never rendering order: the roster is declared and a renderer’s own sequencing is not, so what a join writes is stable under a renderer that happened to produce its units in another order. Every unit standing under a seat is yielded rather than the first, because a rendering that doubled a seat is one the proof refuses and a reading that quietly dropped the second unit would hide the doubling from anybody looking here instead.
Sourcepub fn count_to(&self, destination: Destination) -> usize
pub fn count_to(&self, destination: Destination) -> usize
How many units this rendering materialized into one delivery.
Trait Implementations§
Source§impl<R: Clone + Role> Clone for RenderedProjection<R>
impl<R: Clone + Role> Clone for RenderedProjection<R>
Source§fn clone(&self) -> RenderedProjection<R>
fn clone(&self) -> RenderedProjection<R>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more