#[non_exhaustive]pub enum TenantLifecycleError {
Unknown {
tenant: String,
},
Refused {
tenant: String,
from: TenantStatus,
to: TenantStatus,
},
Backend {
tenant: String,
message: String,
},
}Expand description
Why a registry write did not happen.
Carries the tenant id — the one thing every caller needs to know
which row failed — and never a DSN, mirroring crate::tenant::TenantDbError:
the DSN is a global secret (ADR 0008) that the registry exists to
name, not to hand out, and an error is exactly the thing most
likely to be logged verbatim. The one field that holds foreign text,
Backend’s message, goes through crate::logging::scrub_text
when rendered, because a driver message can quote a connect string —
the guarantee belongs to this type, not to whoever constructs it,
and construction is not something an enum’s variants can control.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
No registry row for this tenant.
Refused
The move is not one TenantStatus::can_become allows.
Backend
The registry write itself failed.
Trait Implementations§
Source§impl Clone for TenantLifecycleError
impl Clone for TenantLifecycleError
Source§impl Debug for TenantLifecycleError
impl Debug for TenantLifecycleError
Source§impl Display for TenantLifecycleError
impl Display for TenantLifecycleError
impl Eq for TenantLifecycleError
Source§impl Error for TenantLifecycleError
impl Error for TenantLifecycleError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for TenantLifecycleError
impl PartialEq for TenantLifecycleError
impl StructuralPartialEq for TenantLifecycleError
Auto Trait Implementations§
impl Freeze for TenantLifecycleError
impl RefUnwindSafe for TenantLifecycleError
impl Send for TenantLifecycleError
impl Sync for TenantLifecycleError
impl Unpin for TenantLifecycleError
impl UnsafeUnpin for TenantLifecycleError
impl UnwindSafe for TenantLifecycleError
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
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.