pub struct RlsPolicyBuilder { /* private fields */ }Expand description
Builder for RLS policies.
Implementations§
Source§impl RlsPolicyBuilder
impl RlsPolicyBuilder
Sourcepub fn for_command(self, cmd: PolicyCommand) -> Self
pub fn for_command(self, cmd: PolicyCommand) -> Self
Set the command this policy applies to.
Sourcepub fn for_select(self) -> Self
pub fn for_select(self) -> Self
For SELECT only.
Sourcepub fn for_insert(self) -> Self
pub fn for_insert(self) -> Self
For INSERT only.
Sourcepub fn for_update(self) -> Self
pub fn for_update(self) -> Self
For UPDATE only.
Sourcepub fn for_delete(self) -> Self
pub fn for_delete(self) -> Self
For DELETE only.
Sourcepub fn with_check(self, expr: impl Into<String>) -> Self
pub fn with_check(self, expr: impl Into<String>) -> Self
Set the WITH CHECK expression.
Sourcepub fn restrictive(self) -> Self
pub fn restrictive(self) -> Self
Make this a restrictive policy.
Sourcepub fn permissive(self) -> Self
pub fn permissive(self) -> Self
Make this a permissive policy (default).
Trait Implementations§
Source§impl Clone for RlsPolicyBuilder
impl Clone for RlsPolicyBuilder
Source§fn clone(&self) -> RlsPolicyBuilder
fn clone(&self) -> RlsPolicyBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 RlsPolicyBuilder
impl RefUnwindSafe for RlsPolicyBuilder
impl Send for RlsPolicyBuilder
impl Sync for RlsPolicyBuilder
impl Unpin for RlsPolicyBuilder
impl UnwindSafe for RlsPolicyBuilder
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