pub struct Buffer<'a> { /* private fields */ }
Expand description
A single connection uses just two buffers, allocated at the beginning of the connection. This type is a view into one of these buffer, which can be used to send orders via the provided methods.
Implementations
sourceimpl<'a> Buffer<'a>
impl<'a> Buffer<'a>
sourcepub fn parse<Name: AsRef<[u8]>>(
&mut self,
statement_name: Name,
statement: &str,
parameter_types: &[SqlType]
)
pub fn parse<Name: AsRef<[u8]>>(
&mut self,
statement_name: Name,
statement: &str,
parameter_types: &[SqlType]
)
Parse a statement.
sourcepub fn named_bind<'b, 'c>(
&'b mut self,
portal_name: &'c str,
statement: &'static str,
parameters: &[&dyn ToSql]
) -> Portal<'b, 'a, 'c>
pub fn named_bind<'b, 'c>(
&'b mut self,
portal_name: &'c str,
statement: &'static str,
parameters: &[&dyn ToSql]
) -> Portal<'b, 'a, 'c>
Bind a statement to parameters and a “portal”, which is a
result identifier. If only one statement is executed at a
time, the unnamed portal (i.e. ""
) works.
sourcepub fn bind<'b>(
&'b mut self,
statement: &'static str,
parameters: &[&dyn ToSql]
) -> Portal<'b, 'a, 'static>
pub fn bind<'b>(
&'b mut self,
statement: &'static str,
parameters: &[&dyn ToSql]
) -> Portal<'b, 'a, 'static>
Bind a statement to parameters and a “portal”, which is a
result identifier. If only one statement is executed at a
time, the unnamed portal (i.e. ""
) works.
sourcepub fn bind_unnamed<'b>(
&'b mut self,
statement: &str,
parameters: &[&dyn ToSql]
) -> Portal<'b, 'a, 'static>
pub fn bind_unnamed<'b>(
&'b mut self,
statement: &str,
parameters: &[&dyn ToSql]
) -> Portal<'b, 'a, 'static>
Bind a statement to parameters and a “portal”, which is a
result identifier. If only one statement is executed at a
time, the unnamed portal (i.e. ""
) works.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Buffer<'a>
impl<'a> Send for Buffer<'a>
impl<'a> Sync for Buffer<'a>
impl<'a> Unpin for Buffer<'a>
impl<'a> !UnwindSafe for Buffer<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more