#[non_exhaustive]pub struct ErrorDetail {
pub location: Option<ErrorLocation>,
pub error_info: Option<ErrorInfo>,
/* private fields */
}Expand description
Provides details for errors, e.g. issues that where encountered when processing a subtask.
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.location: Option<ErrorLocation>Optional. The exact location within the resource (if applicable).
error_info: Option<ErrorInfo>Required. Describes the cause of the error with structured detail.
Implementations§
Source§impl ErrorDetail
impl ErrorDetail
pub fn new() -> Self
Sourcepub fn set_location<T>(self, v: T) -> Selfwhere
T: Into<ErrorLocation>,
pub fn set_location<T>(self, v: T) -> Selfwhere
T: Into<ErrorLocation>,
Sourcepub fn set_or_clear_location<T>(self, v: Option<T>) -> Selfwhere
T: Into<ErrorLocation>,
pub fn set_or_clear_location<T>(self, v: Option<T>) -> Selfwhere
T: Into<ErrorLocation>,
Sourcepub fn set_error_info<T>(self, v: T) -> Self
pub fn set_error_info<T>(self, v: T) -> Self
Sets the value of error_info.
§Example
ⓘ
use rpc::model::ErrorInfo;
let x = ErrorDetail::new().set_error_info(ErrorInfo::default()/* use setters */);Sourcepub fn set_or_clear_error_info<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error_info<T>(self, v: Option<T>) -> Self
Sets or clears the value of error_info.
§Example
ⓘ
use rpc::model::ErrorInfo;
let x = ErrorDetail::new().set_or_clear_error_info(Some(ErrorInfo::default()/* use setters */));
let x = ErrorDetail::new().set_or_clear_error_info(None::<ErrorInfo>);Trait Implementations§
Source§impl Clone for ErrorDetail
impl Clone for ErrorDetail
Source§fn clone(&self) -> ErrorDetail
fn clone(&self) -> ErrorDetail
Returns a duplicate 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 ErrorDetail
impl Debug for ErrorDetail
Source§impl Default for ErrorDetail
impl Default for ErrorDetail
Source§fn default() -> ErrorDetail
fn default() -> ErrorDetail
Returns the “default value” for a type. Read more
Source§impl Message for ErrorDetail
impl Message for ErrorDetail
Source§impl PartialEq for ErrorDetail
impl PartialEq for ErrorDetail
impl StructuralPartialEq for ErrorDetail
Auto Trait Implementations§
impl Freeze for ErrorDetail
impl RefUnwindSafe for ErrorDetail
impl Send for ErrorDetail
impl Sync for ErrorDetail
impl Unpin for ErrorDetail
impl UnwindSafe for ErrorDetail
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