Enum iroh_blobs::store::ExportMode
source · 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 moresource§impl Debug for ExportMode
impl Debug for ExportMode
source§impl Default for ExportMode
impl Default for ExportMode
source§fn default() -> ExportMode
fn default() -> ExportMode
source§impl<'de> Deserialize<'de> for ExportMode
impl<'de> Deserialize<'de> for ExportMode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for ExportMode
impl PartialEq for ExportMode
source§fn eq(&self, other: &ExportMode) -> bool
fn eq(&self, other: &ExportMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ExportMode
impl Serialize for ExportMode
impl Copy for ExportMode
impl Eq for ExportMode
impl StructuralPartialEq for ExportMode
Auto Trait Implementations§
impl Freeze for ExportMode
impl RefUnwindSafe for ExportMode
impl Send for ExportMode
impl Sync for ExportMode
impl Unpin for ExportMode
impl UnwindSafe for ExportMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.