Skip to main content

ServiceUnavailableBuilder

Struct ServiceUnavailableBuilder 

Source
pub struct ServiceUnavailableBuilder { /* private fields */ }

Implementations§

Source§

impl ServiceUnavailableBuilder

Source

pub fn with_retry_after_seconds(self, seconds: u64) -> Self

Source

pub fn with_detail(self, detail: impl Into<String>) -> Self

Override the default "Service temporarily unavailable" Problem.detail text. Callers that already curated a safe, non-secret detail string upstream (e.g. "authorization evaluation failed", "IdP plugin unreachable") pass it here so the canonical envelope preserves the precise reason for the outage rather than collapsing every 503 into the same opaque message.

Caller contract: the string MUST be safe for the public Problem body — no DSN fragments, no driver text, no hostnames, no operator-supplied config strings. Sources that can carry such fragments (raw DbErr, vendor SDK error Display) MUST pass through a redaction step (e.g. redacted_db_diagnostic) before calling this builder.

Source

pub fn create(self) -> CanonicalError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.