pub struct SecurityProviderError { /* private fields */ }Expand description
Operational failure at a security-provider boundary.
Formatting is intentionally fixed and never renders the typed source. The
source remains available for internal downcasting through Self::source
and std::error::Error::source.
Implementations§
Source§impl SecurityProviderError
impl SecurityProviderError
Sourcepub fn new(kind: SecurityProviderFailure, operation: SecurityOperation) -> Self
pub fn new(kind: SecurityProviderFailure, operation: SecurityOperation) -> Self
Creates a source-free provider failure.
Sourcepub fn caused_by(
kind: SecurityProviderFailure,
operation: SecurityOperation,
source: impl StdError + Send + Sync + 'static,
) -> Self
pub fn caused_by( kind: SecurityProviderFailure, operation: SecurityOperation, source: impl StdError + Send + Sync + 'static, ) -> Self
Creates a provider failure while retaining its typed source.
Sourcepub fn contract(
operation: SecurityOperation,
violation: SecurityContractViolation,
) -> Self
pub fn contract( operation: SecurityOperation, violation: SecurityContractViolation, ) -> Self
Wraps a deterministic contract violation for a specific operation.
Sourcepub const fn kind(&self) -> SecurityProviderFailure
pub const fn kind(&self) -> SecurityProviderFailure
Returns the stable failure category.
Sourcepub const fn operation(&self) -> SecurityOperation
pub const fn operation(&self) -> SecurityOperation
Returns the closed operation identifier.
Borrows the canonical error retained by this provider failure.
Consumes this facade and returns its canonical error allocation.
Sourcepub fn descriptor(&self) -> &'static ErrorDescriptor
pub fn descriptor(&self) -> &'static ErrorDescriptor
Returns the catalog descriptor that owns this failure’s identity.
Sourcepub fn condition(&self) -> CanonicalCondition
pub fn condition(&self) -> CanonicalCondition
Returns the descriptor-owned canonical condition.
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Returns the descriptor-owned severity.
Sourcepub fn recovery_hint(&self) -> RecoveryHint
pub fn recovery_hint(&self) -> RecoveryHint
Returns the descriptor-owned recovery hint.
Sourcepub fn context(&self) -> &ErrorContext
pub fn context(&self) -> &ErrorContext
Returns the bounded diagnostic context.
Sourcepub fn location(&self) -> &'static Location<'static>
pub fn location(&self) -> &'static Location<'static>
Returns the first-promotion caller location.
Sourcepub fn backtrace(&self) -> Option<&Backtrace>
pub fn backtrace(&self) -> Option<&Backtrace>
Returns the catalog-controlled captured backtrace, when enabled.
Sourcepub fn public_view(&self) -> Result<PublicErrorView<'_>, ViewContextViolation>
pub fn public_view(&self) -> Result<PublicErrorView<'_>, ViewContextViolation>
Creates the descriptor-validated public projection.
§Errors
Returns a schema violation only if the owner-generated context no longer matches the selected provider descriptor.
Sourcepub fn diagnostic_view(
&self,
) -> Result<DiagnosticView<'_>, ViewContextViolation>
pub fn diagnostic_view( &self, ) -> Result<DiagnosticView<'_>, ViewContextViolation>
Creates the descriptor-validated controlled diagnostic projection.
§Errors
Returns a schema violation only if the owner-generated context no longer matches the selected provider descriptor.
Trait Implementations§
Source§impl Clone for SecurityProviderError
impl Clone for SecurityProviderError
Source§impl Debug for SecurityProviderError
impl Debug for SecurityProviderError
Source§impl Display for SecurityProviderError
impl Display for SecurityProviderError
Source§impl Error for SecurityProviderError
impl Error for SecurityProviderError
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()