pub struct Tenant { /* private fields */ }Expand description
The tenant a request belongs to. Immutable, and built only by core’s resolution layer from a registry row — never from a header, a path segment, or module code.
Clone because a request carries it into deferred work. Deliberately
not Deserialize: the threat is an identity read back in from an
attacker-supplied body, not one written out, so Serialize is fine
and wanted — a tenant id is a structured log field.
ⓘ
use cratefield_core::{Tenant, TenantStatus};
// No public constructor, so a handler cannot conjure a neighbour.
let _t = Tenant::new("other", TenantStatus::Active);Implementations§
Trait Implementations§
impl Eq for Tenant
impl StructuralPartialEq for Tenant
Auto Trait Implementations§
impl Freeze for Tenant
impl RefUnwindSafe for Tenant
impl Send for Tenant
impl Sync for Tenant
impl Unpin for Tenant
impl UnsafeUnpin for Tenant
impl UnwindSafe for Tenant
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
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
Compare self to
key and return true if they are equal.