pub struct ErrorDetails { /* private fields */ }Expand description
Error facts supplied by the error owner, not collected from logs or state.
Implementations§
Source§impl ErrorDetails
impl ErrorDetails
Sourcepub fn new(
title: impl Into<String>,
message: impl Into<String>,
stage: impl Into<String>,
) -> Self
pub fn new( title: impl Into<String>, message: impl Into<String>, stage: impl Into<String>, ) -> Self
Legacy errors without a source timestamp are observed now, not backdated.
pub fn with_recorded_at(self, at: DateTime<Utc>) -> Self
pub fn with_code(self, code: impl Into<String>) -> Self
Sourcepub fn with_chain(self, chain: impl Into<String>) -> Self
pub fn with_chain(self, chain: impl Into<String>) -> Self
Include the available underlying chain alongside a friendly code. Copy and logging apply the same private-value redaction and text bound.
Sourcepub fn with_private_values(
self,
values: impl IntoIterator<Item = String>,
) -> Self
pub fn with_private_values( self, values: impl IntoIterator<Item = String>, ) -> Self
Append target/resource/draft values used only for removal from error text. These inputs are never rendered, logged or serialized. Matching is literal and case-sensitive, with identifier boundaries to preserve ordinary words.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ErrorDetails
impl Freeze for ErrorDetails
impl Move for ErrorDetails
impl RefUnwindSafe for ErrorDetails
impl Send for ErrorDetails
impl Sync for ErrorDetails
impl Unpin for ErrorDetails
impl UnsafeUnpin for ErrorDetails
impl UnwindSafe for ErrorDetails
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