pub struct BatchPlan {
pub selection: Selection,
pub patch: IssuePatch,
pub items: Vec<ItemPlan>,
pub pair: Option<PairPlan>,
pub archive: Option<ArchiveRequest>,
pub confirmation: Option<Confirmation>,
}Expand description
A read-only preview. Cancelling one changes nothing, by construction.
Fields§
§selection: SelectionThe exact selection this plan was built from, so an apply can check that the thing it was authorized for is the thing in front of it.
patch: IssuePatch§items: Vec<ItemPlan>§pair: Option<PairPlan>The relationship change this plan proposes, if the patch named a pair.
archive: Option<ArchiveRequest>The archive request this plan carries, unapplied.
confirmation: Option<Confirmation>The confirmation, absent until one is issued. None is the ordinary state;
see Confirmation.
Implementations§
Source§impl BatchPlan
impl BatchPlan
Sourcepub fn actionable(&self) -> impl Iterator<Item = &ItemPlan>
pub fn actionable(&self) -> impl Iterator<Item = &ItemPlan>
The items that would be written.
Sourcepub fn confirmation_is_valid(&self) -> bool
pub fn confirmation_is_valid(&self) -> bool
Whether a confirmation on this plan is still valid.
A confirmation authorizes a specific plan. If either the selection or the patch has changed, it is a different plan and the old confirmation does not carry over (contract §4: “any change to selection or patch requires a new preview”).
Trait Implementations§
impl Eq for BatchPlan
impl StructuralPartialEq for BatchPlan
Auto Trait Implementations§
impl Freeze for BatchPlan
impl RefUnwindSafe for BatchPlan
impl Send for BatchPlan
impl Sync for BatchPlan
impl Unpin for BatchPlan
impl UnsafeUnpin for BatchPlan
impl UnwindSafe for BatchPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more