pub enum ErrorDetail {
Withheld,
Disclosed,
}Expand description
Whether a denial tells the client why it was denied.
enableSanitizedErrorResponse (Options/Definitions.js:253-258). Upstream’s default is
true, and its check is config?.enableSanitizedErrorResponse !== false (Error.js:21), so
an absent config withholds too. ErrorDetail::Withheld is therefore what a stock deployment
runs, and it is the message every unmodified SDK sees.
No Default impl, deliberately. The disclosing regime is a configuration decision, and a
type that hands one out lets a call site acquire it by forgetting rather than by choosing.
Every value of this type is derived from a config field.
Variants§
Withheld
The client sees the generic message. The detail stays server-side.
Disclosed
The client sees the detailed message. enableSanitizedErrorResponse: false.
Implementations§
Source§impl ErrorDetail
impl ErrorDetail
Sourcepub fn from_sanitized(enable_sanitized_error_response: bool) -> Self
pub fn from_sanitized(enable_sanitized_error_response: bool) -> Self
From the config flag, so the mapping lives in one place rather than at each call site.
Trait Implementations§
Source§impl Clone for ErrorDetail
impl Clone for ErrorDetail
Source§fn clone(&self) -> ErrorDetail
fn clone(&self) -> ErrorDetail
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ErrorDetail
Source§impl Debug for ErrorDetail
impl Debug for ErrorDetail
impl Eq for ErrorDetail
Source§impl PartialEq for ErrorDetail
impl PartialEq for ErrorDetail
impl StructuralPartialEq for ErrorDetail
Auto Trait Implementations§
impl Freeze for ErrorDetail
impl RefUnwindSafe for ErrorDetail
impl Send for ErrorDetail
impl Sync for ErrorDetail
impl Unpin for ErrorDetail
impl UnsafeUnpin for ErrorDetail
impl UnwindSafe for ErrorDetail
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.