pub struct SqliteConfigBuilder { /* private fields */ }Expand description
Builder for SqliteConfig
Implementations§
Source§impl SqliteConfigBuilder
impl SqliteConfigBuilder
Sourcepub fn read_tables(self, mode: TablePermissionMode) -> Self
pub fn read_tables(self, mode: TablePermissionMode) -> Self
Set read permissions
Sourcepub fn write_tables(self, mode: TablePermissionMode) -> Self
pub fn write_tables(self, mode: TablePermissionMode) -> Self
Set write permissions
Sourcepub fn allow_read<I, S>(self, tables: I) -> Self
pub fn allow_read<I, S>(self, tables: I) -> Self
Allow only specific tables for reading
Sourcepub fn allow_write<I, S>(self, tables: I) -> Self
pub fn allow_write<I, S>(self, tables: I) -> Self
Allow only specific tables for writing
Sourcepub fn deny_write<I, S>(self, tables: I) -> Self
pub fn deny_write<I, S>(self, tables: I) -> Self
Deny specific tables for writing
Sourcepub fn build(self) -> Result<SqliteConfig, ConfigError>
pub fn build(self) -> Result<SqliteConfig, ConfigError>
Build the configuration.
§Errors
Returns ConfigError::EmptyDenyList if either read or write permissions
use an empty deny list, since that allows all tables (use AllowAll instead).
Trait Implementations§
Source§impl Clone for SqliteConfigBuilder
impl Clone for SqliteConfigBuilder
Source§impl Debug for SqliteConfigBuilder
impl Debug for SqliteConfigBuilder
Auto Trait Implementations§
impl Freeze for SqliteConfigBuilder
impl RefUnwindSafe for SqliteConfigBuilder
impl Send for SqliteConfigBuilder
impl Sync for SqliteConfigBuilder
impl Unpin for SqliteConfigBuilder
impl UnsafeUnpin for SqliteConfigBuilder
impl UnwindSafe for SqliteConfigBuilder
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.