Struct CronDeliveryArgs
pub struct CronDeliveryArgs {
pub delivery_channel: Option<String>,
pub delivery_to: Option<String>,
pub delivery_thread: Option<String>,
pub no_best_effort: bool,
pub best_effort: bool,
}Expand description
Shared delivery flags for the cron creation and update subcommands.
Flattened into add, add-at, add-every, once, and update so a job’s
output can be routed to a channel. When none of these are set the job keeps
delivery mode "none" (output is computed but not announced anywhere).
On update these are a patch: only the fields given are changed, and the
rest are carried over from the job’s stored delivery config.
Fields§
§delivery_channel: Option<String>Announce job output to this channel (e.g. telegram, discord, slack).
delivery_to: Option<String>Target chat/recipient id for the channel (e.g. a Telegram chat id).
allow_hyphen_values is required because supported recipients start with
a hyphen: Telegram group and channel ids are negative (-100…), and a
forum topic target is chat:thread (-100…:42), which is hyphen-led but
not a number. Without it clap treats the value as a flag and exits before
any delivery validation runs, leaving only the undocumented --to=<value>
form working.
allow_negative_numbers is not enough: it accepts -100… but still
rejects the chat:thread form. The broader setting alone would let a
forgotten value swallow the following flag, so parse_delivery_recipient
rejects ---prefixed values and names the offending token.
delivery_thread: Option<String>Optional thread/conversation id, for channels that route on it (webhook).
no_best_effort: boolFail the job if delivery fails (default: delivery errors are non-fatal).
best_effort: boolKeep the job succeeding when delivery fails. Restores the default after
a previous --no-best-effort.
Implementations§
Source§impl CronDeliveryArgs
impl CronDeliveryArgs
Sourcepub fn best_effort_override(&self) -> Option<bool>
pub fn best_effort_override(&self) -> Option<bool>
The requested best-effort setting, or None when neither flag is given.
The two flags are mutually exclusive at the clap layer, so at most one is ever set.
Trait Implementations§
Source§impl Args for CronDeliveryArgs
impl Args for CronDeliveryArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Clone for CronDeliveryArgs
impl Clone for CronDeliveryArgs
Source§fn clone(&self) -> CronDeliveryArgs
fn clone(&self) -> CronDeliveryArgs
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CronDeliveryArgs
impl Debug for CronDeliveryArgs
Source§impl Default for CronDeliveryArgs
impl Default for CronDeliveryArgs
Source§fn default() -> CronDeliveryArgs
fn default() -> CronDeliveryArgs
Source§impl<'de> Deserialize<'de> for CronDeliveryArgs
impl<'de> Deserialize<'de> for CronDeliveryArgs
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CronDeliveryArgs
Source§impl FromArgMatches for CronDeliveryArgs
impl FromArgMatches for CronDeliveryArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl PartialEq for CronDeliveryArgs
impl PartialEq for CronDeliveryArgs
Source§fn eq(&self, other: &CronDeliveryArgs) -> bool
fn eq(&self, other: &CronDeliveryArgs) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CronDeliveryArgs
impl Serialize for CronDeliveryArgs
impl StructuralPartialEq for CronDeliveryArgs
Auto Trait Implementations§
impl Freeze for CronDeliveryArgs
impl RefUnwindSafe for CronDeliveryArgs
impl Send for CronDeliveryArgs
impl Sync for CronDeliveryArgs
impl Unpin for CronDeliveryArgs
impl UnsafeUnpin for CronDeliveryArgs
impl UnwindSafe for CronDeliveryArgs
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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