pub struct AccessRule {
pub table: String,
pub row_filter: Option<String>,
pub allowed_columns: Option<HashSet<String>>,
pub denied_columns: HashSet<String>,
}Expand description
权限规则
Fields§
§table: String表名
row_filter: Option<String>行级过滤条件(SQL WHERE 子句片段)
allowed_columns: Option<HashSet<String>>允许查询的字段列表(None 表示允许所有字段)
denied_columns: HashSet<String>禁止查询的字段列表
Trait Implementations§
Source§impl Clone for AccessRule
impl Clone for AccessRule
Source§fn clone(&self) -> AccessRule
fn clone(&self) -> AccessRule
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 moreAuto Trait Implementations§
impl Freeze for AccessRule
impl RefUnwindSafe for AccessRule
impl Send for AccessRule
impl Sync for AccessRule
impl Unpin for AccessRule
impl UnsafeUnpin for AccessRule
impl UnwindSafe for AccessRule
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