Skip to main content

RenderedProjection

Struct RenderedProjection 

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

Source

pub fn of_one(unit: RenderedUnit<R>) -> Self

The one-unit rendering. Total: one unit always fits.

Source

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.

Source

pub fn first(&self) -> &RenderedUnit<R>

The guaranteed first unit.

Source

pub fn units(&self) -> &NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>

The rendered units, in the order the renderer produced them; structurally at least one.

Source

pub fn under(&self, role: R) -> Option<&RenderedUnit<R>>

The unit rendered under one seat, where one was.

Source

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.

Source

pub fn count_under(&self, role: R) -> usize

How many units were rendered under one seat.

Source

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.

Source

pub fn count_to(&self, destination: Destination) -> usize

How many units this rendering materialized into one delivery.

Source

pub fn count(&self) -> usize

How many units were rendered; structurally at least one.

Trait Implementations§

Source§

impl<R: Clone + Role> Clone for RenderedProjection<R>

Source§

fn clone(&self) -> RenderedProjection<R>

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<R: Debug + Role> Debug for RenderedProjection<R>

Source§

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

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

impl<R: Eq + Role> Eq for RenderedProjection<R>

Source§

impl<R: PartialEq + Role> PartialEq for RenderedProjection<R>

Source§

fn eq(&self, other: &RenderedProjection<R>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<R: PartialEq + Role> StructuralPartialEq for RenderedProjection<R>

Auto Trait Implementations§

§

impl<R> Freeze for RenderedProjection<R>
where NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>: Freeze,

§

impl<R> RefUnwindSafe for RenderedProjection<R>
where NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>: RefUnwindSafe,

§

impl<R> Send for RenderedProjection<R>
where NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>: Send,

§

impl<R> Sync for RenderedProjection<R>
where NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>: Sync,

§

impl<R> Unpin for RenderedProjection<R>
where NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>: Unpin,

§

impl<R> UnsafeUnpin for RenderedProjection<R>
where NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>: UnsafeUnpin,

§

impl<R> UnwindSafe for RenderedProjection<R>
where NonEmpty<RenderedUnit<R>, MEMBERSHIP_LIMIT>: 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.