Skip to main content

Task

Struct Task 

Source
pub struct Task {
    pub generation: u64,
    pub removal: Option<Removal>,
    pub name: String,
    pub root: PathBuf,
    pub state_dir: PathBuf,
    pub participants: Vec<Participant>,
    pub checkout: bool,
    pub no_fetch: bool,
    pub lifecycle: TaskLifecycle,
    pub operation: Operation,
    pub problem: Option<Problem>,
}
Expand description

Membership, placement and operation history for one task incarnation.

Fields§

§generation: u64

Identifier distinguishing successive uses of the same task name.

§removal: Option<Removal>

Removal or restoration evidence associated with this task.

§name: String

Branch name that identifies this task.

§root: PathBuf

Directory under which the task branch path is placed.

§state_dir: PathBuf

Directory holding authoritative Workyard state.

§participants: Vec<Participant>

Members associated with this task or operation.

§checkout: bool

Allow reuse of an existing target branch.

§no_fetch: bool

Use locally available refs without fetching.

§lifecycle: TaskLifecycle

Current membership lifecycle of the task.

§operation: Operation

Invocation history tracked separately from task lifecycle.

§problem: Option<Problem>

Diagnostic describing a failure or an unresolved condition.

Implementations§

Source§

impl Task

Source

pub fn admitted_roots(&self, previous: Option<&Self>) -> Vec<PathBuf>

Only a newly established worktree can publish its original discovery roots. A later no-op recovery must respect an intervening explicit untrack.

Source

pub fn creation_options(&self, index: usize) -> CreationOptions

Use the participant’s creation policy, falling back to the task defaults.

Trait Implementations§

Source§

impl Clone for Task

Source§

fn clone(&self) -> Self

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 Debug for Task

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for Task

§

impl Freeze for Task

§

impl Move for Task

§

impl RefUnwindSafe for Task

§

impl Send for Task

§

impl Sync for Task

§

impl Unpin for Task

§

impl UnsafeUnpin for Task

§

impl UnwindSafe for Task

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.