pub struct NoPolicy;Expand description
The policy of a host that adds nothing to sqlive’s own rules: it refuses no statement.
Trait Implementations§
impl Copy for NoPolicy
Source§impl Policy for NoPolicy
impl Policy for NoPolicy
Source§type Failure = HandleFailure
type Failure = HandleFailure
What the host’s handle fails with: the host’s own failures, and
sqlive’s, which the host converts into this type through
From.Source§type Scope = ()
type Scope = ()
A part of the host’s work the policy judges differently, which the
host runs through
HostSql::within.Source§fn judge(&self, _action: &PolicyAction<'_>) -> Result<(), Infallible>
fn judge(&self, _action: &PolicyAction<'_>) -> Result<(), Infallible>
Judge an action the authorizer’s rules allowed;
Err refuses the
statement with it. A host statement’s actions come here too, so the
policy sees every action allowed.Source§fn check_sql(&self, _tokens: &[Token]) -> Result<(), Infallible>
fn check_sql(&self, _tokens: &[Token]) -> Result<(), Infallible>
Judge an app statement’s text before it is prepared.
Source§fn begin_app_call(&self)
fn begin_app_call(&self)
A new app call begins: forget what the last statement left.
Source§fn host_object(&self, _name: &str) -> bool
fn host_object(&self, _name: &str) -> bool
Whether
name, a trigger or view, is the host’s own object.Source§fn statement_key(&self) -> u64
fn statement_key(&self) -> u64
What the policy adds to the app statement cache’s key.
Source§fn refresh(&self, _sql: &HostSql<Self>, _extent: Refresh) -> Result<()>
fn refresh(&self, _sql: &HostSql<Self>, _extent: Refresh) -> Result<()>
Read again what the policy keeps of the connection’s schema: all of
it, or what changed since it last read. The connection calls it with
Refresh::Whole as it opens and with Refresh::Changed before each
app statement, and the host through refresh_policy.Auto Trait Implementations§
impl Freeze for NoPolicy
impl RefUnwindSafe for NoPolicy
impl Send for NoPolicy
impl Sync for NoPolicy
impl Unpin for NoPolicy
impl UnsafeUnpin for NoPolicy
impl UnwindSafe for NoPolicy
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