#[non_exhaustive]pub struct UpdateRejection {
pub message: String,
pub failure_type: Option<String>,
pub validation_errors: BTreeMap<String, Vec<String>>,
}Expand description
Why an update validator refused an update.
Return it from a validator registered with
Worker::register_update_validator or
Worker::register_replayed_update_validator. The update is rejected
before acceptance: the Server records a rejected update with reason
update_validator_rejected, the update handler never runs and workflow
code never sees the update. The caller receives the message and validation
errors through Error::update_validator_rejection.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: StringThe rejection message returned to the caller.
failure_type: Option<String>An optional application failure type, recorded on the validation task.
validation_errors: BTreeMap<String, Vec<String>>Field names mapped to their validation messages.
Implementations§
Trait Implementations§
Source§impl Clone for UpdateRejection
impl Clone for UpdateRejection
Source§fn clone(&self) -> UpdateRejection
fn clone(&self) -> UpdateRejection
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpdateRejection
impl Debug for UpdateRejection
Source§impl Display for UpdateRejection
impl Display for UpdateRejection
Source§impl Error for UpdateRejection
impl Error for UpdateRejection
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for UpdateRejection
impl From<Error> for UpdateRejection
Source§impl From<Error> for UpdateRejection
impl From<Error> for UpdateRejection
Source§impl PartialEq for UpdateRejection
impl PartialEq for UpdateRejection
impl Eq for UpdateRejection
impl StructuralPartialEq for UpdateRejection
Auto Trait Implementations§
impl Freeze for UpdateRejection
impl RefUnwindSafe for UpdateRejection
impl Send for UpdateRejection
impl Sync for UpdateRejection
impl Unpin for UpdateRejection
impl UnwindSafe for UpdateRejection
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
Mutably borrows from an owned value. Read more