pub struct StorageFileState {
pub id: FileId,
pub path: String,
pub position: u64,
pub options: OpenOptions,
pub storage: InMemoryStorage,
pub is_closed: bool,
pub pending_ops: BTreeMap<u64, PendingStorageOp>,
pub next_op_seq: u64,
}Expand description
State of an individual simulated file.
Fields§
§id: FileIdUnique identifier for this file
path: StringPath this file was opened with
position: u64Current file position for sequential operations
options: OpenOptionsOptions the file was opened with
storage: InMemoryStorageIn-memory storage backing this file
is_closed: boolWhether the file has been closed
pending_ops: BTreeMap<u64, PendingStorageOp>Pending operations keyed by sequence number
next_op_seq: u64Next sequence number for operations on this file
Implementations§
Source§impl StorageFileState
impl StorageFileState
Sourcepub fn new(
id: FileId,
path: String,
options: OpenOptions,
storage: InMemoryStorage,
) -> Self
pub fn new( id: FileId, path: String, options: OpenOptions, storage: InMemoryStorage, ) -> Self
Create a new storage file state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StorageFileState
impl RefUnwindSafe for StorageFileState
impl Send for StorageFileState
impl Sync for StorageFileState
impl Unpin for StorageFileState
impl UnsafeUnpin for StorageFileState
impl UnwindSafe for StorageFileState
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