Skip to main content

GoalCommands

Enum GoalCommands 

Source
pub enum GoalCommands {
    List {
        include_completed: bool,
    },
    Get {
        id: String,
    },
    Create {
        name: String,
        due_date: String,
        description: String,
        color: Option<String>,
        owner: Option<String>,
    },
    Update {
        id: String,
        name: Option<String>,
        due_date: Option<String>,
        description: Option<String>,
        color: Option<String>,
        add_owner: Option<String>,
        rem_owner: Option<String>,
    },
    Delete {
        id: String,
    },
    AddKr {
        goal_id: String,
        name: String,
        kr_type: String,
        steps_start: i64,
        steps_end: i64,
        unit: Option<String>,
        owner: Option<String>,
    },
    UpdateKr {
        kr_id: String,
        steps_current: i64,
        note: Option<String>,
    },
    DeleteKr {
        kr_id: String,
    },
}

Variants§

§

List

List goals in workspace

Fields

§include_completed: bool

Include completed goals

§

Get

Get a goal by ID

Fields

§id: String

Goal ID

§

Create

Create a goal

Fields

§name: String

Goal name

§due_date: String

Due date (Unix ms)

§description: String

Description

§color: Option<String>

Color hex (e.g. #32a852)

§owner: Option<String>

Owner user ID

§

Update

Update a goal

Fields

§id: String

Goal ID

§name: Option<String>

New name

§due_date: Option<String>

New due date (Unix ms)

§description: Option<String>

New description

§color: Option<String>

New color hex

§add_owner: Option<String>

Add owner by user ID

§rem_owner: Option<String>

Remove owner by user ID

§

Delete

Delete a goal

Fields

§id: String

Goal ID

§

AddKr

Add a key result to a goal

Fields

§goal_id: String

Goal ID

§name: String

Key result name

§kr_type: String

Type: number, currency, boolean, percentage, automatic

§steps_start: i64

Starting step value

§steps_end: i64

Target step value

§unit: Option<String>

Unit label (e.g. “tasks”)

§owner: Option<String>

Owner user ID

§

UpdateKr

Update a key result

Fields

§kr_id: String

Key result ID

§steps_current: i64

Current step value

§note: Option<String>

Note

§

DeleteKr

Delete a key result

Fields

§kr_id: String

Key result ID

Trait Implementations§

Source§

impl FromArgMatches for GoalCommands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for GoalCommands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more