Skip to main content

PlannedMerge

Struct PlannedMerge 

Source
pub struct PlannedMerge<'a> { /* private fields */ }
Expand description

A merge that has been decided and not yet made.

The commit the trunk will land on is settled at construction and every refusal has already happened, so the line announcing this merge can be written before the trunk moves. PlannedMerge::apply is the only way to move it, and Worktrees::plan_merge is this value’s only source.

Implementations§

Source§

impl PlannedMerge<'_>

Source

pub fn commit(&self) -> String

The commit the city trunk will point at, for the line that says so.

Source

pub fn apply(self, landing: &Landing<'_>) -> Result<(), StorageError>

Brings a node’s committed work into the city’s own trunk, as a merge commit carrying the merging run’s trailers. The judgement stays fast-forward only; what the history keeps is the merge commit, because a pointer move leaves nothing to read and no place to say who verified it.

§Errors

Propagates a trunk that cannot be read, committed onto or checked out. The fast-forward judgement is not repeated: it was made, and refused if it had to be, before this value existed.

Trait Implementations§

Source§

impl Debug for PlannedMerge<'_>

Names the decision, not the repository holding it: a Worktrees has no useful Debug and printing one would say nothing about which merge this is.

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Send for PlannedMerge<'a>

§

impl<'a> !Sync for PlannedMerge<'a>

§

impl<'a> Freeze for PlannedMerge<'a>

§

impl<'a> RefUnwindSafe for PlannedMerge<'a>

§

impl<'a> Unpin for PlannedMerge<'a>

§

impl<'a> UnsafeUnpin for PlannedMerge<'a>

§

impl<'a> UnwindSafe for PlannedMerge<'a>

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> 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, 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.