Skip to main content

ViewAction

Enum ViewAction 

Source
pub enum ViewAction {
    List {
        scope: Option<String>,
    },
    Show {
        reference: String,
    },
    Create {
        name: String,
        scope: ViewScopeArgs,
        plan: ViewPlanArgs,
    },
    Update {
        reference: String,
        name: Option<String>,
        plan: ViewPlanArgs,
    },
    Duplicate {
        reference: String,
        name: Option<String>,
    },
    Delete {
        reference: String,
        confirm: bool,
    },
    Apply {
        reference: String,
    },
    Status {
        reference: Option<String>,
        live: ViewPlanArgs,
    },
    Share {
        reference: String,
        scope: ViewScopeArgs,
    },
}
Expand description

The tix view saved-view subcommands (#172; mission saved-issue-views-01M3C926, WP04).

A real subcommand tree, not an optional-verb enum like LinkAction: there is no meaningful bare tix view (bare tix view would be the issue-printer, which takes an issue selector), so every saved-view operation names its verb. The nine verbs are the surface contract’s spelling (contracts/cli-surface.md).

The plan-shaping flags are ViewPlanArgs and the scope flags are ViewScopeArgs, flattened into the verbs that take them so create, update, share, and status cannot drift apart.

Variants§

§

List

List saved views, in declaration order, as tab-separated rows

Fields

§scope: Option<String>

Only views in this scope family: repository | project | user

§

Show

Show one saved view: stable id, name, scope, normalized plan, diagnostics

Fields

§reference: String

Stable view id, or its display name

§

Create

Save a new view from the existing query grammar

The id is generated and stable (spec §3: “use stable generated IDs; names are display labels”); it is printed on the first stdout line so a script can capture it.

Fields

§name: String

Display label

§

Update

Replace an existing view’s definition, keeping its stable id

Only the fields you name change; the rest are carried over from the stored definition, so tix view update <id> --name X is a rename and nothing else (identity survives a rename, C-002).

Fields

§reference: String

Stable view id, or its display name

§name: Option<String>

New display label; omitted means keep the current one

§

Duplicate

Copy a view under a new stable id

Fields

§reference: String

Stable view id, or its display name

§name: Option<String>

Label for the copy; omitted means the source’s label

§

Delete

Remove a view definition only; requires --confirm

Never deletes an issue, comment, or relationship.

Fields

§reference: String

Stable view id, or its display name

§confirm: bool

Acknowledge that only the saved definition is removed

§

Apply

Apply a saved view read-only: render its plan, result, and active marker

Fields

§reference: String

Stable view id, or its display name

§

Status

Report the saved plan against a live plan, field by field

Without an id it reports the (absent) active marker — never a silent “in sync”. With an id, the live plan is assembled from the plan flags given here, in the existing grammar.

Fields

§reference: Option<String>

Stable view id, or its display name; omitted reports the active marker

§

Share

Change a view’s explicit sharing/visibility scope metadata

Scope is metadata: user scope stores an owner/shared-with label and grants no permission and creates no account (C-003/C-009).

Fields

§reference: String

Stable view id, or its display name

Trait Implementations§

Source§

impl FromArgMatches for ViewAction

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 ViewAction

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