pub enum StorageMode {
Auto,
Sparse,
Full,
Mmap,
IoUring,
Iocp,
}Expand description
How torrent files are allocated on disk.
Matches libtorrent’s storage_mode_t.
Variants§
Auto
Auto-select: mmap on 64-bit, pread/pwrite on 32-bit.
Sparse
Sparse file allocation (set_len, no pre-allocation).
Full
Full pre-allocation (fallocate / write zeros).
Mmap
Memory-mapped file I/O (64-bit recommended).
IoUring
io_uring kernel-bypass I/O (Linux 5.6+).
Falls back to standard I/O when io_uring is unavailable.
Iocp
IOCP kernel async I/O (Windows). Falls back to standard I/O when IOCP is unavailable.
Trait Implementations§
Source§impl Clone for StorageMode
impl Clone for StorageMode
Source§fn clone(&self) -> StorageMode
fn clone(&self) -> StorageMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StorageMode
impl Debug for StorageMode
Source§impl Default for StorageMode
impl Default for StorageMode
Source§fn default() -> StorageMode
fn default() -> StorageMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StorageMode
impl<'de> Deserialize<'de> for StorageMode
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StorageMode
impl PartialEq for StorageMode
Source§fn eq(&self, other: &StorageMode) -> bool
fn eq(&self, other: &StorageMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for StorageMode
impl Serialize for StorageMode
impl Copy for StorageMode
impl Eq for StorageMode
impl StructuralPartialEq for StorageMode
Auto Trait Implementations§
impl Freeze for StorageMode
impl RefUnwindSafe for StorageMode
impl Send for StorageMode
impl Sync for StorageMode
impl Unpin for StorageMode
impl UnsafeUnpin for StorageMode
impl UnwindSafe for StorageMode
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