pub struct ApplicationErrorContext { /* private fields */ }Expand description
Bounded symbolic context for one application failure.
Implementations§
Source§impl ApplicationErrorContext
impl ApplicationErrorContext
Sourcepub fn with_contract(
self,
lineage: ContractLineage,
version: ContractVersion,
) -> Self
pub fn with_contract( self, lineage: ContractLineage, version: ContractVersion, ) -> Self
Adds exact contract identity already visible to the caller.
Sourcepub fn with_operation_symbol(
self,
symbol: String,
) -> Result<Self, ApplicationErrorContextError>
pub fn with_operation_symbol( self, symbol: String, ) -> Result<Self, ApplicationErrorContextError>
Adds one checked caller-visible query, module, command, or role symbol.
Sourcepub fn with_symbol_path(
self,
symbols: Vec<String>,
) -> Result<Self, ApplicationErrorContextError>
pub fn with_symbol_path( self, symbols: Vec<String>, ) -> Result<Self, ApplicationErrorContextError>
Adds a bounded checked caller-visible symbol path.
Sourcepub const fn with_source_span(self, source_span: ApplicationSourceSpan) -> Self
pub const fn with_source_span(self, source_span: ApplicationSourceSpan) -> Self
Adds a checked source span.
Sourcepub const fn with_trace_id(self, trace_id: RequestId) -> Self
pub const fn with_trace_id(self, trace_id: RequestId) -> Self
Adds the request identity as the safe end-to-end trace identity.
Sourcepub const fn contract(&self) -> Option<&(ContractLineage, ContractVersion)>
pub const fn contract(&self) -> Option<&(ContractLineage, ContractVersion)>
Exact selected contract, when safely known.
Sourcepub fn operation_symbol(&self) -> Option<&str>
pub fn operation_symbol(&self) -> Option<&str>
Caller-visible operation symbol, when safely known.
Sourcepub fn symbol_path(&self) -> &[String]
pub fn symbol_path(&self) -> &[String]
Caller-visible symbolic path.
Sourcepub const fn source_span(&self) -> Option<ApplicationSourceSpan>
pub const fn source_span(&self) -> Option<ApplicationSourceSpan>
Source span, when safely known.
Trait Implementations§
Source§impl Clone for ApplicationErrorContext
impl Clone for ApplicationErrorContext
Source§impl Debug for ApplicationErrorContext
impl Debug for ApplicationErrorContext
Source§impl Default for ApplicationErrorContext
impl Default for ApplicationErrorContext
impl Eq for ApplicationErrorContext
Source§impl PartialEq for ApplicationErrorContext
impl PartialEq for ApplicationErrorContext
impl StructuralPartialEq for ApplicationErrorContext
Auto Trait Implementations§
impl Freeze for ApplicationErrorContext
impl RefUnwindSafe for ApplicationErrorContext
impl Send for ApplicationErrorContext
impl Sync for ApplicationErrorContext
impl Unpin for ApplicationErrorContext
impl UnsafeUnpin for ApplicationErrorContext
impl UnwindSafe for ApplicationErrorContext
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