pub enum FilesystemChange {
DirectoryCreated {
inode_id: InodeId,
parent_inode_id: InodeId,
display_name: DisplayName,
binding_generation: String,
},
FileCreated {
inode_id: InodeId,
parent_inode_id: InodeId,
display_name: DisplayName,
binding_generation: String,
revision_no: RevisionNo,
content_ref: ContentRef,
},
ContentChanged {
inode_id: InodeId,
revision_no: RevisionNo,
content_ref: ContentRef,
},
Moved {
inode_id: InodeId,
from_parent_inode_id: InodeId,
from_display_name: DisplayName,
to_parent_inode_id: InodeId,
to_display_name: DisplayName,
binding_generation: String,
},
Deleted {
inode_id: InodeId,
deleted_binding: Option<DirectoryBinding>,
},
Undeleted {
inode_id: InodeId,
parent_inode_id: InodeId,
display_name: DisplayName,
binding_generation: String,
},
AttributesChanged {
inode_id: InodeId,
attributes_revision_no: AttributeRevisionNo,
attributes: Attributes,
},
}Expand description
One semantic filesystem change inside a commit.
A commit’s events are the operations it applied, in the order it applied them. One request operation can apply several: creating missing parent directories, or replacing a file by moving over it, each produce an event per directory created or file replaced. So a request with three operations may report more than three events, and the events stay in request order. Events name inodes and their parent-directory bindings rather than full paths; a consumer that needs paths can stat the inode or maintain its own binding projection from this feed.
Variants§
DirectoryCreated
A directory was created.
Fields
display_name: DisplayNameUser-facing spelling of the new entry.
FileCreated
A file and its first revision were created.
Fields
display_name: DisplayNameUser-facing spelling of the new entry.
revision_no: RevisionNoFirst revision number.
content_ref: ContentRefContent of the first revision.
ContentChanged
A file received a new current revision — a put over an existing file, or a revision restore (one durable fact for both).
Fields
revision_no: RevisionNoNew monotonic position in that file’s revision history.
content_ref: ContentRefImmutable content published by the revision.
Moved
An inode moved to a new parent directory or name.
Fields
from_display_name: DisplayNameSpelling of the old binding.
to_display_name: DisplayNameSpelling of the new binding.
Deleted
A file or directory subtree was deleted. Use the enclosing change’s
committed_seq as deletion_seq when restoring it.
Fields
deleted_binding: Option<DirectoryBinding>Directory binding removed by the deletion, when the delete recorded one.
Undeleted
A deleted inode was recovered and re-bound.
Fields
display_name: DisplayNameSpelling of the recovered binding.
AttributesChanged
An inode’s attributes changed.
Fields
attributes_revision_no: AttributeRevisionNoNew attribute revision for that inode.
attributes: AttributesThe inode’s complete attribute map after the update, so a consumer projects it without reading anything back. An empty map is the cleared state.
Trait Implementations§
Source§impl Clone for FilesystemChange
impl Clone for FilesystemChange
Source§fn clone(&self) -> FilesystemChange
fn clone(&self) -> FilesystemChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more