pub struct Handle<R> { /* private fields */ }
Expand description
A handle to a database connection that has been spawn to an event loop. This is actually a synchronization channel.
Implementations
sourceimpl<R: Request + HandleRow> Handle<R>
impl<R: Request + HandleRow> Handle<R>
sourcepub fn send_request<F>(&self, r: F) -> SendRequest<R>where
R: From<F>,
pub fn send_request<F>(&self, r: F) -> SendRequest<R>where
R: From<F>,
Send a request to this handle. Methods from the Request
and
HandleRow
traits will be called as needed.
The request will be sent through a futures::mpsc
channel,
along with a futures::channel::oneshot
channel to “wait” the
result on.
pub fn shutdown(&self) -> ShutdownFuture<R>
Trait Implementations
Auto Trait Implementations
impl<R> !RefUnwindSafe for Handle<R>
impl<R> Send for Handle<R>where
R: Send,
impl<R> Sync for Handle<R>where
R: Send,
impl<R> Unpin for Handle<R>
impl<R> !UnwindSafe for Handle<R>
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