#[non_exhaustive]pub struct NoticeCopy {Show 39 fields
pub nothing_submitted: LocalizedText,
pub nothing_deleted: LocalizedText,
pub draft_only: LocalizedText,
pub no_external_effects: LocalizedText,
pub partial_result: LocalizedText,
pub select_target_title: LocalizedText,
pub select_target_cancel: LocalizedText,
pub condition_title: LocalizedText,
pub condition_yes: LocalizedText,
pub condition_no: LocalizedText,
pub act_refused: LocalizedText,
pub target_policy_mismatch: LocalizedText,
pub target_unauthorized: LocalizedText,
pub target_missing: LocalizedText,
pub target_stale: LocalizedText,
pub target_unresolved: LocalizedText,
pub target_too_many_candidates: LocalizedText,
pub several_open_cases: LocalizedText,
pub no_active_interaction: LocalizedText,
pub text_resolution_not_allowed: LocalizedText,
pub unknown_option: LocalizedText,
pub unknown_workflow: LocalizedText,
pub unknown_operation: LocalizedText,
pub already_answered_running: LocalizedText,
pub already_answered_done: LocalizedText,
pub already_answered_failed: LocalizedText,
pub already_answered_closed: LocalizedText,
pub invalid_arguments: LocalizedText,
pub not_proposable: LocalizedText,
pub blocked_by_mode: LocalizedText,
pub forbidden_risk_class: LocalizedText,
pub human_review_required: LocalizedText,
pub prerequisite_not_done: LocalizedText,
pub record_not_found: LocalizedText,
pub record_not_found_yet: LocalizedText,
pub record_not_unique: LocalizedText,
pub not_understood: LocalizedText,
pub message_unreadable: LocalizedText,
pub kept_unchanged: LocalizedText,
}Expand description
Server-authored copy for everything the reducer writes itself.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.nothing_submitted: LocalizedTextBody of the notice::NOTHING_SUBMITTED notice.
nothing_deleted: LocalizedTextBody of the notice::NOTHING_DELETED notice.
draft_only: LocalizedTextBody of the notice::DRAFT_ONLY notice.
no_external_effects: LocalizedTextBody of the notice::NO_EXTERNAL_EFFECTS notice.
partial_result: LocalizedTextBody of the notice::PARTIAL_RESULT notice.
select_target_title: LocalizedTextTitle of a selection card.
select_target_cancel: LocalizedTextLabel of the “none of these” option on a selection card.
condition_title: LocalizedTextTitle of the card an ApplyOnlyIf constraint raises.
condition_yes: LocalizedTextLabel of the “yes, apply it” option on that card.
condition_no: LocalizedTextLabel of the “no, leave it” option on that card.
act_refused: LocalizedTextBody of the notice::ACT_REFUSED notice, for a domain rejection that carried
no explanation. Deliberately vague: a workflow that wants the user told why uses
DomainRejection::with_explanation.
The runtime’s own refusals have their own fields below.
target_policy_mismatch: LocalizedTextThe act aimed at a shape the operation does not accept.
The handle named a record this actor may not reach.
target_missing: LocalizedTextNothing matched the record the act named.
target_stale: LocalizedTextThe record moved on since the handle was issued.
target_unresolved: LocalizedTextThe target resolved to something the reducer cannot use.
target_too_many_candidates: LocalizedTextToo many records matched to offer an honest choice.
several_open_cases: LocalizedTextThe workflow the act would start already has more than one case open.
no_active_interaction: LocalizedTextThe act addressed the card on screen and there is none.
text_resolution_not_allowed: LocalizedTextThe card may not be answered by typing.
unknown_option: LocalizedTextThe option named is not one the card offers.
unknown_workflow: LocalizedTextThe act named a workflow this deployment does not run.
unknown_operation: LocalizedTextThe act named an operation this turn does not offer.
already_answered_running: LocalizedTextThe card was clicked again while its first answer is still running.
already_answered_done: LocalizedTextThe card was clicked again after its first answer had committed.
already_answered_failed: LocalizedTextThe card was clicked again after its first answer had failed.
already_answered_closed: LocalizedTextThe card was clicked again after it had been closed without doing the work it offered.
invalid_arguments: LocalizedTextThe act’s arguments are not what the operation takes.
not_proposable: LocalizedTextThe act named an operation only a card may run.
blocked_by_mode: LocalizedTextThe orchestration mode may not carry this risk class.
forbidden_risk_class: LocalizedTextThe configuration forbids this risk class outright.
human_review_required: LocalizedTextSomeone other than the user has to authorize this.
prerequisite_not_done: LocalizedTextAn act needed a record another act opens, and that act did not run.
record_not_found: LocalizedTextWhy a record the user named is asked for again: none is called that. {workflow}
and {named} are replaced.
record_not_found_yet: LocalizedTextThe same, when none is called that and one can be registered now.
record_not_unique: LocalizedTextThe same, when several are called that.
not_understood: LocalizedTextWords that produced nothing to act on; {words} is replaced by them.
message_unreadable: LocalizedTextThe whole message could not be read.
kept_unchanged: LocalizedTextActs left alone as the user asked; {words} is replaced by the words asking it.
Implementations§
Source§impl NoticeCopy
impl NoticeCopy
Sourcepub fn already_answered(&self, progress: AnswerProgress) -> &LocalizedText
pub fn already_answered(&self, progress: AnswerProgress) -> &LocalizedText
What a user is told when they click a card that was already answered.
Sourcepub fn runtime_refusal(
&self,
code: &str,
) -> Option<(&'static str, &LocalizedText)>
pub fn runtime_refusal( &self, code: &str, ) -> Option<(&'static str, &LocalizedText)>
The notice code and body for a refusal the runtime decided, or
None when the code is not one of its own.
The returned code is the rejection’s own, not
notice::ACT_REFUSED, and that is the point of the pair. Notices are
deduplicated by code, so a turn in which one act named a record nobody
could find and another answered a card that is not on screen used to
reach the user as a single sentence covering neither. Now it reaches
them as two, each keyed on a code an application can style, translate or
route on.
Trait Implementations§
Source§impl Clone for NoticeCopy
impl Clone for NoticeCopy
Source§impl Debug for NoticeCopy
impl Debug for NoticeCopy
Source§impl Default for NoticeCopy
impl Default for NoticeCopy
impl Eq for NoticeCopy
Source§impl PartialEq for NoticeCopy
impl PartialEq for NoticeCopy
Source§impl ServerCopy for NoticeCopy
impl ServerCopy for NoticeCopy
Source§fn entries(&self) -> Vec<(&'static str, &LocalizedText)>
fn entries(&self) -> Vec<(&'static str, &LocalizedText)>
Source§fn entries_mut(&mut self) -> Vec<(&'static str, &mut LocalizedText)>
fn entries_mut(&mut self) -> Vec<(&'static str, &mut LocalizedText)>
impl StructuralPartialEq for NoticeCopy
Auto Trait Implementations§
impl Freeze for NoticeCopy
impl RefUnwindSafe for NoticeCopy
impl Send for NoticeCopy
impl Sync for NoticeCopy
impl Unpin for NoticeCopy
impl UnsafeUnpin for NoticeCopy
impl UnwindSafe for NoticeCopy
Blanket Implementations§
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.