Skip to main content

Plan

Struct Plan 

Source
pub struct Plan<K: Kind> { /* private fields */ }
Expand description

One plan: the complete output set of one request, named before any syntax exists.

Every seat is required, and the seats that could have been empty are shapes that cannot be — the output set, the watch set, the trace, and the trail are all structurally non-empty. Only the nonclaims may be empty, because a plan that claims exactly what it does has none to state.

The account is not a copy of anything: it is the value the caller walked in with, moved into the plan, so the plan’s own answer to “what were you planned over” is what its identity, its watch set, and its origin edges were all read off.

Implementations§

Source§

impl<K: Kind> Plan<K>

Source

pub fn planned( account: Account<K>, decided_under: Context, decisions: PlanDecisions<K::Role>, ) -> Self

Plans one projection over the account the content walked in with.

The account arrives first because it is what was MEANT; the context is what that intent was decided under, and the decisions are the record of the decision. Total: everything that could refuse refused where it was declared, so a plan is assembled out of values that already hold.

Source

pub const fn identity(&self) -> PlanId

This plan’s own identity.

Source

pub const fn provenance(&self) -> &Provenance

The record of how that identity was derived.

Source

pub const fn account(&self) -> &Account<K>

The account this plan was planned over, whole.

A reader asking what invalidates it, what caused it, or what it stands on reads the seats of this value rather than a summary of them.

Source

pub fn intent(&self) -> Intent

What this plan MEANT.

The comparison equivalence is stated over — never the plan identity, which carries origin and is required to differ between distinct requests. Read off the plan’s own account, so the intent a plan reports and the intent its transcript opened with are one derivation rather than two.

Source

pub const fn context(&self) -> &Context

The exact facts this plan was decided under.

Source

pub const fn content(&self) -> &K::Content

The kind-specific facts.

Source

pub const fn membership(&self) -> &Membership<K::Role>

The complete declared output set.

Source

pub fn invalidation(&self) -> &InvalidationSet

The triggers whose change invalidates this plan; structurally at least one.

Source

pub const fn trace(&self) -> &DecisionTrace

The decisions that produced this plan, in selection order.

Source

pub const fn origin(&self) -> &OriginTrail

Where this plan itself came from.

Source

pub fn nonclaims(&self) -> &[Nonclaim]

What this plan explicitly does not claim.

Trait Implementations§

Source§

impl<K: Clone + Kind> Clone for Plan<K>
where K::Role: Clone,

Source§

fn clone(&self) -> Plan<K>

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<K: Debug + Kind> Debug for Plan<K>
where K::Role: Debug,

Source§

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

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

impl<K: Eq + Kind> Eq for Plan<K>
where K::Role: Eq,

Source§

impl<K: PartialEq + Kind> PartialEq for Plan<K>
where K::Role: PartialEq,

Source§

fn eq(&self, other: &Plan<K>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<K: PartialEq + Kind> StructuralPartialEq for Plan<K>
where K::Role: PartialEq,

Auto Trait Implementations§

§

impl<K> Freeze for Plan<K>
where Account<K>: Freeze, Membership<<K as Kind>::Role>: Freeze,

§

impl<K> RefUnwindSafe for Plan<K>

§

impl<K> Send for Plan<K>
where Account<K>: Send, Membership<<K as Kind>::Role>: Send,

§

impl<K> Sync for Plan<K>
where Account<K>: Sync, Membership<<K as Kind>::Role>: Sync,

§

impl<K> Unpin for Plan<K>
where Account<K>: Unpin, Membership<<K as Kind>::Role>: Unpin,

§

impl<K> UnsafeUnpin for Plan<K>

§

impl<K> UnwindSafe for Plan<K>

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.