pub struct TenantPermissions {
pub row_level_policies: Vec<RowLevelSecurityPolicy>,
pub column_masking_rules: Vec<ColumnMaskingRule>,
pub roles: Vec<String>,
}Expand description
租户权限(行级安全策略 + 列级脱敏规则 + 角色列表)
Fields§
§row_level_policies: Vec<RowLevelSecurityPolicy>行级安全策略列表
column_masking_rules: Vec<ColumnMaskingRule>列级脱敏规则列表
roles: Vec<String>角色列表
Implementations§
Source§impl TenantPermissions
impl TenantPermissions
Sourcepub fn with_row_level_policy(self, policy: RowLevelSecurityPolicy) -> Self
pub fn with_row_level_policy(self, policy: RowLevelSecurityPolicy) -> Self
添加行级安全策略
Sourcepub fn with_column_masking_rule(self, rule: ColumnMaskingRule) -> Self
pub fn with_column_masking_rule(self, rule: ColumnMaskingRule) -> Self
添加列级脱敏规则
Sourcepub fn with_roles(self, roles: Vec<String>) -> Self
pub fn with_roles(self, roles: Vec<String>) -> Self
设置角色列表
Trait Implementations§
Source§impl Clone for TenantPermissions
impl Clone for TenantPermissions
Source§fn clone(&self) -> TenantPermissions
fn clone(&self) -> TenantPermissions
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 moreSource§impl Debug for TenantPermissions
impl Debug for TenantPermissions
Source§impl Default for TenantPermissions
impl Default for TenantPermissions
Source§fn default() -> TenantPermissions
fn default() -> TenantPermissions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TenantPermissions
impl RefUnwindSafe for TenantPermissions
impl Send for TenantPermissions
impl Sync for TenantPermissions
impl Unpin for TenantPermissions
impl UnsafeUnpin for TenantPermissions
impl UnwindSafe for TenantPermissions
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<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