[−][src]Struct tokio_postgres::CopyInSink
A sink for COPY ... FROM STDIN
query data.
The copy must be explicitly completed via the Sink::close
or finish
methods. If it is
not, the copy will be aborted.
Methods
impl<T> CopyInSink<T> where
T: Buf + 'static + Send,
[src][−]
T: Buf + 'static + Send,
pub fn poll_finish(
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<u64, Error>>
[src][−]
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<u64, Error>>
A poll-based version of finish
.
pub async fn finish<'_>(__arg0: Pin<&'_ mut Self>) -> Result<u64, Error>
[src][−]
Completes the copy, returning the number of rows inserted.
The Sink::close
method is equivalent to finish
, except that it does not return the
number of rows.
Trait Implementations
impl<T> Sink<T> for CopyInSink<T> where
T: Buf + 'static + Send,
[src][+]
T: Buf + 'static + Send,
impl<'__pin, T> Unpin for CopyInSink<T> where
__Origin<'__pin, T>: Unpin,
[src]
__Origin<'__pin, T>: Unpin,
Auto Trait Implementations
impl<T> !RefUnwindSafe for CopyInSink<T>
impl<T> Send for CopyInSink<T> where
T: Send,
T: Send,
impl<T> Sync for CopyInSink<T> where
T: Sync,
T: Sync,
impl<T> !UnwindSafe for CopyInSink<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T, Item> SinkExt<Item> for T where
T: Sink<Item> + ?Sized,
[src][+]
T: Sink<Item> + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[+]
V: MultiLane<T>,