Skip to main content

StreamCommand

Enum StreamCommand 

Source
pub enum StreamCommand {
Show 26 variants Subvol { path: String, uuid: Uuid, ctransid: u64, }, Snapshot { path: String, uuid: Uuid, ctransid: u64, clone_uuid: Uuid, clone_ctransid: u64, }, Mkfile { path: String, }, Mkdir { path: String, }, Mknod { path: String, mode: u64, rdev: u64, }, Mkfifo { path: String, }, Mksock { path: String, }, Symlink { path: String, target: String, }, Rename { from: String, to: String, }, Link { path: String, target: String, }, Unlink { path: String, }, Rmdir { path: String, }, Write { path: String, offset: u64, data: Vec<u8>, }, Clone { path: String, offset: u64, len: u64, clone_uuid: Uuid, clone_ctransid: u64, clone_path: String, clone_offset: u64, }, SetXattr { path: String, name: String, data: Vec<u8>, }, RemoveXattr { path: String, name: String, }, Truncate { path: String, size: u64, }, Chmod { path: String, mode: u64, }, Chown { path: String, uid: u64, gid: u64, }, Utimes { path: String, atime: Timespec, mtime: Timespec, ctime: Timespec, }, UpdateExtent { path: String, offset: u64, len: u64, }, EncodedWrite { path: String, offset: u64, unencoded_file_len: u64, unencoded_len: u64, unencoded_offset: u64, compression: u32, encryption: u32, data: Vec<u8>, }, Fallocate { path: String, mode: u32, offset: u64, len: u64, }, Fileattr { path: String, attr: u64, }, EnableVerity { path: String, algorithm: u8, block_size: u32, salt: Vec<u8>, sig: Vec<u8>, }, End,
}
Expand description

A parsed command from the send stream.

Variants§

§

Subvol

Fields

§path: String
§uuid: Uuid
§ctransid: u64
§

Snapshot

Fields

§path: String
§uuid: Uuid
§ctransid: u64
§clone_uuid: Uuid
§clone_ctransid: u64
§

Mkfile

Fields

§path: String
§

Mkdir

Fields

§path: String
§

Mknod

Fields

§path: String
§mode: u64
§rdev: u64
§

Mkfifo

Fields

§path: String
§

Mksock

Fields

§path: String

Fields

§path: String
§target: String
§

Rename

Fields

§from: String

Fields

§path: String
§target: String

Fields

§path: String
§

Rmdir

Fields

§path: String
§

Write

Fields

§path: String
§offset: u64
§data: Vec<u8>
§

Clone

Fields

§path: String
§offset: u64
§len: u64
§clone_uuid: Uuid
§clone_ctransid: u64
§clone_path: String
§clone_offset: u64
§

SetXattr

Fields

§path: String
§name: String
§data: Vec<u8>
§

RemoveXattr

Fields

§path: String
§name: String
§

Truncate

Fields

§path: String
§size: u64
§

Chmod

Fields

§path: String
§mode: u64
§

Chown

Fields

§path: String
§uid: u64
§gid: u64
§

Utimes

Fields

§path: String
§atime: Timespec
§mtime: Timespec
§ctime: Timespec
§

UpdateExtent

Fields

§path: String
§offset: u64
§len: u64
§

EncodedWrite

v2: write pre-compressed data that can be passed through to the filesystem without decompression via BTRFS_IOC_ENCODED_WRITE.

Fields

§path: String
§offset: u64
§unencoded_file_len: u64

Unencoded (decompressed) file length to write.

§unencoded_len: u64

Total unencoded length (may be larger due to sector alignment).

§unencoded_offset: u64

Offset within the unencoded data where the file data starts.

§compression: u32

Compression algorithm (0=none, 1=zlib, 2=zstd, 3-7=lzo with varying sector sizes).

§encryption: u32

Encryption algorithm (currently always 0).

§data: Vec<u8>
§

Fallocate

v2: preallocate space or punch a hole.

Fields

§path: String
§mode: u32

FALLOC_FL_* flags (0=allocate, 1=KEEP_SIZE, 3=PUNCH_HOLE|KEEP_SIZE).

§offset: u64
§len: u64
§

Fileattr

v2: set inode file attributes (chattr flags).

Fields

§path: String
§attr: u64
§

EnableVerity

v3: enable fs-verity on a file.

Fields

§path: String
§algorithm: u8
§block_size: u32
§salt: Vec<u8>
§sig: Vec<u8>
§

End

Trait Implementations§

Source§

impl Debug for StreamCommand

Source§

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

Formats the value using the given formatter. Read more

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.