pub enum TablePermissionMode {
AllowAll,
AllowList(HashSet<String>),
DenyList(HashSet<String>),
}Expand description
Table permission mode - either allow specific tables or deny specific tables
Variants§
AllowAll
Allow all tables (default behavior)
AllowList(HashSet<String>)
Only allow access to specified tables
DenyList(HashSet<String>)
Deny access to specified tables, allow all others
Implementations§
Source§impl TablePermissionMode
impl TablePermissionMode
Sourcepub fn is_allowed(&self, table: &str) -> bool
pub fn is_allowed(&self, table: &str) -> bool
Check if access to a table is allowed
Sourcepub fn deny<I, S>(tables: I) -> Self
pub fn deny<I, S>(tables: I) -> Self
Create a deny-list permission.
Note: Empty deny lists are rejected at SqliteConfigBuilder::build() time
since they allow all tables, which is confusing. Use TablePermissionMode::AllowAll instead.
Trait Implementations§
Source§impl Clone for TablePermissionMode
impl Clone for TablePermissionMode
Source§impl Debug for TablePermissionMode
impl Debug for TablePermissionMode
Auto Trait Implementations§
impl Freeze for TablePermissionMode
impl RefUnwindSafe for TablePermissionMode
impl Send for TablePermissionMode
impl Sync for TablePermissionMode
impl Unpin for TablePermissionMode
impl UnsafeUnpin for TablePermissionMode
impl UnwindSafe for TablePermissionMode
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 moreCreates a shared type from an unshared type.