Struct ApplicationErrorContext
pub struct ApplicationErrorContext { /* private fields */ }Expand description
Bounded symbolic context for one application failure.
Implementations§
§impl ApplicationErrorContext
impl ApplicationErrorContext
pub const fn empty() -> ApplicationErrorContext
pub const fn empty() -> ApplicationErrorContext
Constructs empty context for a failure that has no honest symbol.
pub fn with_contract(
self,
lineage: ContractLineage,
version: ContractVersion,
) -> ApplicationErrorContext
pub fn with_contract( self, lineage: ContractLineage, version: ContractVersion, ) -> ApplicationErrorContext
Adds exact contract identity already visible to the caller.
pub fn with_operation_symbol(
self,
symbol: String,
) -> Result<ApplicationErrorContext, ApplicationErrorContextError>
pub fn with_operation_symbol( self, symbol: String, ) -> Result<ApplicationErrorContext, ApplicationErrorContextError>
Adds one checked caller-visible query, module, command, or role symbol.
pub fn with_symbol_path(
self,
symbols: Vec<String>,
) -> Result<ApplicationErrorContext, ApplicationErrorContextError>
pub fn with_symbol_path( self, symbols: Vec<String>, ) -> Result<ApplicationErrorContext, ApplicationErrorContextError>
Adds a bounded checked caller-visible symbol path.
pub const fn with_source_span(
self,
source_span: ApplicationSourceSpan,
) -> ApplicationErrorContext
pub const fn with_source_span( self, source_span: ApplicationSourceSpan, ) -> ApplicationErrorContext
Adds a checked source span.
pub const fn with_trace_id(self, trace_id: RequestId) -> ApplicationErrorContext
pub const fn with_trace_id(self, trace_id: RequestId) -> ApplicationErrorContext
Adds the request identity as the safe end-to-end trace identity.
pub const fn contract(&self) -> Option<&(ContractLineage, ContractVersion)>
pub const fn contract(&self) -> Option<&(ContractLineage, ContractVersion)>
Exact selected contract, when safely known.
pub fn operation_symbol(&self) -> Option<&str>
pub fn operation_symbol(&self) -> Option<&str>
Caller-visible operation symbol, when safely known.
pub fn symbol_path(&self) -> &[String]
pub fn symbol_path(&self) -> &[String]
Caller-visible symbolic path.
pub const fn source_span(&self) -> Option<ApplicationSourceSpan>
pub const fn source_span(&self) -> Option<ApplicationSourceSpan>
Source span, when safely known.
Trait Implementations§
§impl Clone for ApplicationErrorContext
impl Clone for ApplicationErrorContext
§fn clone(&self) -> ApplicationErrorContext
fn clone(&self) -> ApplicationErrorContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ApplicationErrorContext
impl Debug for ApplicationErrorContext
§impl Default for ApplicationErrorContext
impl Default for ApplicationErrorContext
§fn default() -> ApplicationErrorContext
fn default() -> ApplicationErrorContext
Returns the “default value” for a type. Read more
impl Eq for ApplicationErrorContext
§impl PartialEq for ApplicationErrorContext
impl PartialEq for ApplicationErrorContext
§fn eq(&self, other: &ApplicationErrorContext) -> bool
fn eq(&self, other: &ApplicationErrorContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ApplicationErrorContext
Auto Trait Implementations§
impl !RefUnwindSafe for ApplicationErrorContext
impl !UnwindSafe for ApplicationErrorContext
impl Freeze for ApplicationErrorContext
impl Send for ApplicationErrorContext
impl Sync for ApplicationErrorContext
impl Unpin for ApplicationErrorContext
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].