pub enum ExportMode {
Copy,
TryReference,
}
Expand description
The import mode describes how files will be imported.
This is a hint to the import trait method. For some implementations, this
does not make any sense. E.g. an in memory implementation will always have
to copy the file into memory. Also, a disk based implementation might choose
to copy small files even if the mode is Reference
.
Variants§
Copy
This mode will copy the file to the target directory.
This is the safe default because the file can not be accidentally modified after it has been exported.
TryReference
This mode will try to move the file to the target directory and then reference it from the database.
This has a large performance and storage benefit, but it is less safe since the file might be modified in the target directory after it has been exported.
Stores are allowed to ignore this mode and always copy the file, e.g. if the file is very small or if the store does not support referencing files.
Trait Implementations§
Source§impl Clone for ExportMode
impl Clone for ExportMode
Source§fn clone(&self) -> ExportMode
fn clone(&self) -> ExportMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more