pub struct CachedPlanRef<B = ()> { /* private fields */ }Expand description
Lightweight reference to a cached plan for query execution. Contains only what’s needed to execute: the immutable statement and param info.
Implementations§
Source§impl<B> CachedPlanRef<B>
impl<B> CachedPlanRef<B>
Sourcepub fn statement(&self) -> &Statement
pub fn statement(&self) -> &Statement
Return the immutable parsed statement owned by this plan.
Sourcepub fn has_params(&self) -> bool
pub fn has_params(&self) -> bool
Whether the statement requires positional or named bindings.
Sourcepub fn param_count(&self) -> usize
pub fn param_count(&self) -> usize
Exact number of positional bindings required by the statement.
Sourcepub fn parameter_contract(&self) -> &ParameterContract
pub fn parameter_contract(&self) -> &ParameterContract
Read-only binding contract associated atomically with the plan.
Trait Implementations§
Source§impl<B: Clone> Clone for CachedPlanRef<B>
impl<B: Clone> Clone for CachedPlanRef<B>
Source§fn clone(&self) -> CachedPlanRef<B>
fn clone(&self) -> CachedPlanRef<B>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<B> Freeze for CachedPlanRef<B>
impl<B> RefUnwindSafe for CachedPlanRef<B>
impl<B> Send for CachedPlanRef<B>
impl<B> Sync for CachedPlanRef<B>
impl<B> Unpin for CachedPlanRef<B>
impl<B> UnsafeUnpin for CachedPlanRef<B>
impl<B> UnwindSafe for CachedPlanRef<B>
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