pub struct StatementCache(RefCell<LruCache<Arc<str>, RawStatement>>);
Expand description
Prepared statements LRU cache.
Tuple Fields§
§0: RefCell<LruCache<Arc<str>, RawStatement>>
Implementations§
Source§impl StatementCache
impl StatementCache
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a statement cache.
fn set_capacity(&self, capacity: usize)
fn get<'conn>( &'conn self, conn: &'conn Connection, sql: &str, ) -> Result<CachedStatement<'conn>>
fn cache_stmt(&self, stmt: RawStatement)
fn flush(&self)
Trait Implementations§
Source§impl Debug for StatementCache
impl Debug for StatementCache
impl Send for StatementCache
Auto Trait Implementations§
impl !Freeze for StatementCache
impl !RefUnwindSafe for StatementCache
impl !Sync for StatementCache
impl Unpin for StatementCache
impl !UnwindSafe for StatementCache
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