pub struct Export<'r, C: Connection, R, T = ()> { /* private fields */ }
Expand description
A database export future
Implementations§
Source§impl<'r, C, R> Export<'r, C, R>where
C: Connection,
impl<'r, C, R> Export<'r, C, R>where
C: Connection,
Source§impl<C, R> Export<'_, C, R, ExportConfig>where
C: Connection,
impl<C, R> Export<'_, C, R, ExportConfig>where
C: Connection,
Sourcepub fn versions(self, versions: bool) -> Self
pub fn versions(self, versions: bool) -> Self
Whether to export all versions of data from the database
Sourcepub fn tables(self, tables: impl Into<TableConfig>) -> Self
pub fn tables(self, tables: impl Into<TableConfig>) -> Self
Whether to export tables or which ones from the database
We can pass a bool
to export all tables or none at all:
db.export(target).with_config().tables(true);
db.export(target).with_config().tables(false);
Or we can pass a Vec<String>
to specify a list of tables to export:
db.export(target).with_config().tables(vec!["users"]);
Source§impl<C, R, T> Export<'_, C, R, T>where
C: Connection,
impl<C, R, T> Export<'_, C, R, T>where
C: Connection,
Sourcepub fn into_owned(self) -> Export<'static, C, R, T>
pub fn into_owned(self) -> Export<'static, C, R, T>
Converts to an owned type which can easily be moved to a different thread
Trait Implementations§
Source§impl<'r, Client, T> IntoFuture for Export<'r, Client, (), T>where
Client: Connection,
impl<'r, Client, T> IntoFuture for Export<'r, Client, (), T>where
Client: Connection,
Source§type IntoFuture = Pin<Box<dyn Future<Output = <Export<'r, Client, (), T> as IntoFuture>::Output> + Sync + Send + 'r>>
type IntoFuture = Pin<Box<dyn Future<Output = <Export<'r, Client, (), T> as IntoFuture>::Output> + Sync + Send + 'r>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl<'r, Client, T> IntoFuture for Export<'r, Client, PathBuf, T>where
Client: Connection,
impl<'r, Client, T> IntoFuture for Export<'r, Client, PathBuf, T>where
Client: Connection,
Source§type IntoFuture = Pin<Box<dyn Future<Output = <Export<'r, Client, PathBuf, T> as IntoFuture>::Output> + Sync + Send + 'r>>
type IntoFuture = Pin<Box<dyn Future<Output = <Export<'r, Client, PathBuf, T> as IntoFuture>::Output> + Sync + Send + 'r>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'r, C, R, T> Freeze for Export<'r, C, R, T>where
R: Freeze,
impl<'r, C, R, T> RefUnwindSafe for Export<'r, C, R, T>
impl<'r, C, R, T> Send for Export<'r, C, R, T>
impl<'r, C, R, T> Sync for Export<'r, C, R, T>
impl<'r, C, R, T> Unpin for Export<'r, C, R, T>
impl<'r, C, R, T> UnwindSafe for Export<'r, C, R, T>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more