pub struct Gated { /* private fields */ }Expand description
A statement that passed every defence and the values bound to it.
Holding the admission rather than only the classification keeps the syntax tree available to the ceilings that need to read it, so nothing downstream has to parse the text a second time.
Implementations§
Source§impl Gated
impl Gated
Sourcepub const fn classification(&self) -> Classification
pub const fn classification(&self) -> Classification
What the statement does.
Sourcepub const fn kind(&self) -> &'static str
pub const fn kind(&self) -> &'static str
The recognised statement shape, such as select or delete.
Sourcepub const fn admission(&self) -> &Admission
pub const fn admission(&self) -> &Admission
The admission, with the syntax tree the defences were read from.
Sourcepub fn values(&self) -> &[String]
pub fn values(&self) -> &[String]
The values bound to the markers, in the order they were given.
Sourcepub fn with_sql(self, sql: String) -> Self
pub fn with_sql(self, sql: String) -> Self
Replaces the text while keeping the admission that cleared it.
Used where this tool appends its own row ceiling to a query it has already admitted. The appended clause is written by this tool and never by the caller, so re-admitting it would only re-prove what is known.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gated
impl RefUnwindSafe for Gated
impl Send for Gated
impl Sync for Gated
impl Unpin for Gated
impl UnsafeUnpin for Gated
impl UnwindSafe for Gated
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