pub struct GcloudObservabilitySystemError {
pub message: String,
pub root_cause: Option<BoxedError>,
}Fields§
§message: String§root_cause: Option<BoxedError>Implementations§
Source§impl GcloudObservabilitySystemError
impl GcloudObservabilitySystemError
Sourcepub fn new(message: String) -> Self
pub fn new(message: String) -> Self
Creates a new GcloudObservabilitySystemError from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn with_message(self, value: String) -> Self
pub fn with_message(self, value: String) -> Self
Returns self with message set to value.
Sourcepub fn root_cause(&mut self, value: BoxedError) -> &mut Self
pub fn root_cause(&mut self, value: BoxedError) -> &mut Self
Sets root_cause to Some(value).
Sourcepub fn reset_root_cause(&mut self) -> &mut Self
pub fn reset_root_cause(&mut self) -> &mut Self
Sets root_cause to None.
Sourcepub fn mopt_root_cause(&mut self, value: Option<BoxedError>) -> &mut Self
pub fn mopt_root_cause(&mut self, value: Option<BoxedError>) -> &mut Self
Sets root_cause to the given Option.
Sourcepub fn with_root_cause(self, value: BoxedError) -> Self
pub fn with_root_cause(self, value: BoxedError) -> Self
Returns self with root_cause set to Some(value).
Sourcepub fn without_root_cause(self) -> Self
pub fn without_root_cause(self) -> Self
Returns self with root_cause set to None.
Sourcepub fn opt_root_cause(self, value: Option<BoxedError>) -> Self
pub fn opt_root_cause(self, value: Option<BoxedError>) -> Self
Returns self with root_cause set to the given Option.
Trait Implementations§
Source§impl Error for GcloudObservabilitySystemError
impl Error for GcloudObservabilitySystemError
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<GcloudObservabilitySystemErrorInit> for GcloudObservabilitySystemError
impl From<GcloudObservabilitySystemErrorInit> for GcloudObservabilitySystemError
Source§fn from(value: GcloudObservabilitySystemErrorInit) -> Self
fn from(value: GcloudObservabilitySystemErrorInit) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for GcloudObservabilitySystemError
impl !UnwindSafe for GcloudObservabilitySystemError
impl Forget for GcloudObservabilitySystemError
impl Freeze for GcloudObservabilitySystemError
impl Move for GcloudObservabilitySystemError
impl Send for GcloudObservabilitySystemError
impl Sync for GcloudObservabilitySystemError
impl Unpin for GcloudObservabilitySystemError
impl UnsafeUnpin for GcloudObservabilitySystemError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request