#[non_exhaustive]pub struct Error {
pub payload: String,
pub context: String,
pub stack_trace: Option<StackTrace>,
/* private fields */
}Expand description
Error describes why the execution was abnormally terminated.
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.payload: StringError message and data returned represented as a JSON string.
context: StringHuman-readable stack trace string.
stack_trace: Option<StackTrace>Stack trace with detailed information of where error was generated.
Implementations§
Source§impl Error
impl Error
pub fn new() -> Self
Sourcepub fn set_payload<T: Into<String>>(self, v: T) -> Self
pub fn set_payload<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_context<T: Into<String>>(self, v: T) -> Self
pub fn set_context<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_stack_trace<T>(self, v: T) -> Selfwhere
T: Into<StackTrace>,
pub fn set_stack_trace<T>(self, v: T) -> Selfwhere
T: Into<StackTrace>,
Sets the value of stack_trace.
§Example
ⓘ
use google_cloud_workflows_executions_v1::model::execution::StackTrace;
let x = Error::new().set_stack_trace(StackTrace::default()/* use setters */);Sourcepub fn set_or_clear_stack_trace<T>(self, v: Option<T>) -> Selfwhere
T: Into<StackTrace>,
pub fn set_or_clear_stack_trace<T>(self, v: Option<T>) -> Selfwhere
T: Into<StackTrace>,
Sets or clears the value of stack_trace.
§Example
ⓘ
use google_cloud_workflows_executions_v1::model::execution::StackTrace;
let x = Error::new().set_or_clear_stack_trace(Some(StackTrace::default()/* use setters */));
let x = Error::new().set_or_clear_stack_trace(None::<StackTrace>);Trait Implementations§
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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