use crate::{
handles::{Statement, StatementImpl},
statement_connection::StatementConnection,
};
pub trait BorrowMutStatement {
type Statement: Statement;
fn borrow(&self) -> &Self::Statement;
fn borrow_mut(&mut self) -> &mut Self::Statement;
}
impl<'o> BorrowMutStatement for StatementImpl<'o> {
type Statement = StatementImpl<'o>;
fn borrow(&self) -> &Self::Statement {
self
}
fn borrow_mut(&mut self) -> &mut Self::Statement {
self
}
}
impl<'o> BorrowMutStatement for &mut StatementImpl<'o> {
type Statement = StatementImpl<'o>;
fn borrow(&self) -> &Self::Statement {
self
}
fn borrow_mut(&mut self) -> &mut Self::Statement {
self
}
}
impl<'o> BorrowMutStatement for StatementConnection<'o> {
type Statement = StatementConnection<'o>;
fn borrow(&self) -> &Self::Statement {
self
}
fn borrow_mut(&mut self) -> &mut Self::Statement {
self
}
}