pub enum Mutation {
Show 14 variants
Create {
path: NamespacePath,
record: FileRecord,
},
Restore {
path: NamespacePath,
record: FileRecord,
},
Remove {
path: NamespacePath,
expected_file_id: MetadataField<FileId>,
},
Rename {
source: NamespacePath,
destination: NamespacePath,
replace: bool,
},
Link {
source: NamespacePath,
destination: NamespacePath,
},
SetMetadata {
path: NamespacePath,
metadata: ObjectId,
},
Write {
path: NamespacePath,
offset: u64,
length: u64,
content: ObjectId,
content_offset: u64,
},
ValidateRegular {
path: NamespacePath,
},
Resize {
path: NamespacePath,
logical_bytes: u64,
},
ZeroRange {
path: NamespacePath,
offset: u64,
length: u64,
allocated: bool,
extend: bool,
},
Preallocate {
path: NamespacePath,
offset: u64,
length: u64,
keep_size: bool,
},
CloneRange {
source: NamespacePath,
source_offset: u64,
destination: NamespacePath,
destination_offset: u64,
length: u64,
},
File {
file_id: FileId,
mutation: FileMutation,
},
CloneFileRange {
source_file_id: FileId,
source_offset: u64,
destination_file_id: FileId,
destination_offset: u64,
length: u64,
},
}Expand description
One ordered mutation within a single-volume atomic batch.
Variants§
Create
Binds a new path-independent file record at an absent path.
Restore
Restores one exact immutable record at a path while preserving any
additional live hard-link bindings to the same identity. Unlike
Create, the identity may already exist in the candidate generation.
Fields
path: NamespacePathNamespace path to restore.
record: FileRecordExact source record. Its link count is adapted to the live binding topology; all other representable facts are restored verbatim.
Remove
Removes one namespace binding.
Fields
path: NamespacePathExisting namespace path.
expected_file_id: MetadataField<FileId>Optional exact file identity precondition.
Rename
Atomically moves one binding within the volume.
Link
Creates another namespace binding to an existing non-directory file.
SetMetadata
Replaces the complete canonical metadata object.
Write
Replaces one logical byte interval with authenticated content.
Fields
path: NamespacePathExisting regular-file path.
ValidateRegular
Validates that one existing path names a regular file without changing it.
Fields
path: NamespacePathExisting regular-file path.
Resize
Changes logical file length while preserving sparse semantics.
ZeroRange
Replaces a range with a hole or physically allocated zeros.
Fields
path: NamespacePathExisting regular-file path.
Preallocate
Allocates sparse holes without replacing existing content.
Fields
path: NamespacePathExisting regular-file path.
CloneRange
Clones one logical range without materializing unchanged content.
Fields
source: NamespacePathExisting source regular file.
destination: NamespacePathExisting destination regular file.
File
Mutates one existing file through its stable path-independent identity.
Fields
mutation: FileMutationOrdered record mutation.
CloneFileRange
Clones one logical range between stable file identities.
Trait Implementations§
impl Eq for Mutation
impl StructuralPartialEq for Mutation
Auto Trait Implementations§
impl Freeze for Mutation
impl RefUnwindSafe for Mutation
impl Send for Mutation
impl Sync for Mutation
impl Unpin for Mutation
impl UnsafeUnpin for Mutation
impl UnwindSafe for Mutation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request