Skip to main content

CycleRecord

Struct CycleRecord 

Source
pub struct CycleRecord {
    pub name: String,
    pub description: Option<String>,
    pub start_date: Option<String>,
    pub due_date: Option<String>,
    pub schedule_id: Option<String>,
    pub sequence: Option<u32>,
    pub state: Option<String>,
}
Expand description

One cycle as stored in docs/cycles/<name>.md frontmatter.

§A generated cycle is a cycle

A cycle that a schedule generated carries its stable identity in the three optional fields below — the schedule it came from, its sequence within that schedule, and its own lifecycle state. They are optional and omitted when absent, so a hand-written cycle’s file is byte-identical to what it was before this existed, and deny_unknown_fields still holds: a generated cycle is the same record kind, not a second format.

That is what makes the compatiblity requirement work: an issue’s cycles value is a name, so a generated cycle must be resolvable by name through the normal cycle machinery (readers, the picker, tix cycle show). Its identity rides beside that name rather than replacing it, and the name stays mutable without touching the identity (C-002/C-003).

Fields§

§name: String

The cycle’s name (identity for a hand-written cycle; a mutable reference label for a generated one).

§description: Option<String>

Optional human description.

§start_date: Option<String>

Optional start date (YYYY-MM-DD).

§due_date: Option<String>

Optional due date (YYYY-MM-DD).

§schedule_id: Option<String>

The schedule that generated this cycle, by stable id. Absent on a hand-written cycle.

§sequence: Option<u32>

The stable sequence of this cycle within its schedule. Absent on a hand-written cycle.

§state: Option<String>

The generated cycle’s lifecycle state (active/closed/paused/skipped). Absent on a hand-written cycle.

Trait Implementations§

Source§

impl Clone for CycleRecord

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 CycleRecord

Source§

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

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

impl Default for CycleRecord

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CycleRecord

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for CycleRecord

Source§

impl From<CycleRecord> for PlanningCycle

Source§

fn from(record: CycleRecord) -> Self

Converts to this type from the input type.
Source§

impl HasName for CycleRecord

Source§

fn name(&self) -> &str

The record’s identity, as stored in its frontmatter name field.
Source§

impl PartialEq for CycleRecord

Source§

fn eq(&self, other: &Self) -> bool

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

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

Inequality operator !=. Read more
Source§

impl Serialize for CycleRecord

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CycleRecord

Auto Trait Implementations§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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