pub enum TenantUpdatePolicy {
Allow,
DenyMismatch,
Strip,
}Expand description
租户隔离行为配置:是否在 update 时强制 tenant_id 不可变更
Variants§
Allow
允许 update 时变更 tenant_id(不推荐,仅在特殊迁移场景使用)
DenyMismatch
update 时若 attrs 中出现 tenant_id 且与 ctx.tenant_id 不一致则报错(默认)
Strip
update 时静默忽略 attrs 中的 tenant_id(保持原值不变)
Trait Implementations§
Source§impl Clone for TenantUpdatePolicy
impl Clone for TenantUpdatePolicy
Source§fn clone(&self) -> TenantUpdatePolicy
fn clone(&self) -> TenantUpdatePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TenantUpdatePolicy
Source§impl Debug for TenantUpdatePolicy
impl Debug for TenantUpdatePolicy
Source§impl Default for TenantUpdatePolicy
impl Default for TenantUpdatePolicy
Source§fn default() -> TenantUpdatePolicy
fn default() -> TenantUpdatePolicy
Returns the “default value” for a type. Read more
impl Eq for TenantUpdatePolicy
Source§impl PartialEq for TenantUpdatePolicy
impl PartialEq for TenantUpdatePolicy
impl StructuralPartialEq for TenantUpdatePolicy
Auto Trait Implementations§
impl Freeze for TenantUpdatePolicy
impl RefUnwindSafe for TenantUpdatePolicy
impl Send for TenantUpdatePolicy
impl Sync for TenantUpdatePolicy
impl Unpin for TenantUpdatePolicy
impl UnsafeUnpin for TenantUpdatePolicy
impl UnwindSafe for TenantUpdatePolicy
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more