Skip to main content

Mutation

Enum Mutation 

Source
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.

Fields

§path: NamespacePath

New namespace path.

§record: FileRecord

Complete immutable initial record.

§

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: NamespacePath

Namespace path to restore.

§record: FileRecord

Exact 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: NamespacePath

Existing namespace path.

§expected_file_id: MetadataField<FileId>

Optional exact file identity precondition.

§

Rename

Atomically moves one binding within the volume.

Fields

§source: NamespacePath

Existing source path.

§destination: NamespacePath

Destination path.

§replace: bool

Whether an existing destination may be replaced.

Creates another namespace binding to an existing non-directory file.

Fields

§source: NamespacePath

Existing source path.

§destination: NamespacePath

New link path.

§

SetMetadata

Replaces the complete canonical metadata object.

Fields

§path: NamespacePath

Existing path.

§metadata: ObjectId

Authenticated metadata object.

§

Write

Replaces one logical byte interval with authenticated content.

Fields

§path: NamespacePath

Existing regular-file path.

§offset: u64

Inclusive destination offset.

§length: u64

Positive byte count.

§content: ObjectId

Authenticated blob containing source bytes.

§content_offset: u64

Inclusive source offset in content.

§

ValidateRegular

Validates that one existing path names a regular file without changing it.

Fields

§path: NamespacePath

Existing regular-file path.

§

Resize

Changes logical file length while preserving sparse semantics.

Fields

§path: NamespacePath

Existing regular-file path.

§logical_bytes: u64

New logical byte length.

§

ZeroRange

Replaces a range with a hole or physically allocated zeros.

Fields

§path: NamespacePath

Existing regular-file path.

§offset: u64

Inclusive logical offset.

§length: u64

Positive byte count.

§allocated: bool

Preserve physical allocation instead of punching a hole.

§extend: bool

Whether the replacement may extend logical file length.

§

Preallocate

Allocates sparse holes without replacing existing content.

Fields

§path: NamespacePath

Existing regular-file path.

§offset: u64

Inclusive logical offset.

§length: u64

Positive byte count.

§keep_size: bool

Preserve logical file length.

§

CloneRange

Clones one logical range without materializing unchanged content.

Fields

§source: NamespacePath

Existing source regular file.

§source_offset: u64

Inclusive source offset.

§destination: NamespacePath

Existing destination regular file.

§destination_offset: u64

Inclusive destination offset.

§length: u64

Positive byte count.

§

File

Mutates one existing file through its stable path-independent identity.

Fields

§file_id: FileId

Existing authenticated file-table identity.

§mutation: FileMutation

Ordered record mutation.

§

CloneFileRange

Clones one logical range between stable file identities.

Fields

§source_file_id: FileId

Existing source regular-file identity.

§source_offset: u64

Inclusive source offset.

§destination_file_id: FileId

Existing destination regular-file identity.

§destination_offset: u64

Inclusive destination offset.

§length: u64

Positive byte count.

Trait Implementations§

Source§

impl Clone for Mutation

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Mutation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Mutation

Source§

impl PartialEq for Mutation

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Mutation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StorageFuture for T
where T: Send,

Source§

impl<T> StorageProvider for T
where T: Send + Sync + ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more