pub struct ServiceUnavailableBuilder { /* private fields */ }Implementations§
pub fn with_retry_after_seconds(self, seconds: u64) -> Self
Sourcepub fn with_detail(self, detail: impl Into<String>) -> Self
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.
pub fn create(self) -> CanonicalError
Auto Trait Implementations§
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