Skip to main content

CaseDraftAction

Enum CaseDraftAction 

Source
pub enum CaseDraftAction {
    New {
        case_ref: String,
        to: Vec<String>,
        cc: Vec<String>,
        subject: String,
        identity: Option<String>,
        body: Option<String>,
        body_file: Option<String>,
    },
    Reply {
        case_ref: String,
        message_id: String,
        identity: Option<String>,
        body: Option<String>,
        body_file: Option<String>,
        all: bool,
    },
    Change {
        case_ref: String,
        draft_name: String,
        subject: Option<String>,
        to: Vec<String>,
        cc: Vec<String>,
        clear_cc: bool,
        identity: Option<String>,
        body: Option<String>,
        body_file: Option<String>,
    },
    Show {
        case_ref: String,
        draft_name: String,
    },
    Validate {
        case_ref: String,
        draft_name: String,
    },
    Save {
        case_ref: String,
        draft_name: String,
    },
    Send {
        case_ref: String,
        draft_name: String,
    },
    Attach {
        case_ref: String,
        draft_name: String,
        path: String,
    },
    Remove {
        case_ref: String,
        draft_name: String,
        reason: Option<String>,
    },
}

Variants§

§

New

Scaffold a new outbound draft (not a reply) in this case.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§to: Vec<String>

Recipient address. Repeatable.

§cc: Vec<String>

Cc address. Repeatable.

§subject: String

Draft subject.

§identity: Option<String>

Workspace identity slug to send as. Defaults to the configured default identity.

§body: Option<String>

Draft body text.

§body_file: Option<String>

Path to a file whose contents become the draft body.

§

Reply

Scaffold a reply draft to a message, prefilled and quoting the original.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§message_id: String

Message id in this case to reply to.

§identity: Option<String>

Workspace identity slug to send as. Defaults to the configured default identity.

§body: Option<String>

Draft body text. Replaces the default reply template when provided.

§body_file: Option<String>

Path to a file whose contents become the draft body.

§all: bool

Reply to all original recipients (To and Cc), not just the sender.

§

Change

Change an existing editable draft in place.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§draft_name: String

Draft markdown file under the case drafts directory.

§subject: Option<String>

Replacement subject.

§to: Vec<String>

Replacement To list. Repeatable; when provided it replaces all To recipients.

§cc: Vec<String>

Replacement Cc list. Repeatable; when provided it replaces all Cc recipients.

§clear_cc: bool

Clear all Cc recipients.

§identity: Option<String>

Change the workspace identity slug used by this draft.

§body: Option<String>

Replacement draft body text.

§body_file: Option<String>

Path to a file whose contents replace the draft body.

§

Show

Show an existing draft in a review-friendly JSON shape.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§draft_name: String

Draft markdown file under the case drafts directory.

§

Validate

Validate a draft under the case drafts directory.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§draft_name: String

Draft markdown file under the case drafts directory.

§

Save

Queue this draft to be saved to the remote Drafts mailbox.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§draft_name: String

Draft markdown file under the case drafts directory.

§

Send

Queue this draft to be sent and recorded in the case after push succeeds.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§draft_name: String

Draft markdown file under the case drafts directory.

§

Attach

Copy or reference a file and add it to a draft’s attachments.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§draft_name: String

Draft markdown file under the case drafts directory.

§path: String

Local file path to attach.

§

Remove

Remove a local draft and any queued outbound item for it.

Fields

§case_ref: String

Case ref: cYYYYMMDDNNN or cYYYYMMDDNNN-any-suffix.

§draft_name: String

Draft markdown file under the case drafts directory.

§reason: Option<String>

Why this draft should be removed; required by default.

Trait Implementations§

Source§

impl Debug for CaseDraftAction

Source§

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

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

impl FromArgMatches for CaseDraftAction

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 CaseDraftAction

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V