pub struct Tenant(pub TenantId);Expand description
Request-scoped tenant identifier.
App code may put it on the Cx with cx.with(Tenant(id)), and server code
and tests may carry it as a request extension; either wins over the signed-in
user’s tenant. No request header sets it. A Tenant registered on the router
with .with(Tenant(id)) reaches every request, so every user acts for that
tenant whatever their memberships.
Tuple Fields§
§0: TenantIdTrait Implementations§
impl Copy for Tenant
impl Eq for Tenant
impl StructuralPartialEq for Tenant
Auto Trait Implementations§
impl Forget for Tenant
impl Freeze for Tenant
impl Move 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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.