pub struct ResizeArgs {
pub devid: Option<u64>,
pub amount: ResizeAmount,
}Expand description
Arguments for a resize operation.
devid selects which device within the filesystem to resize. When None,
the kernel defaults to device ID 1 (the first device).
Fields§
§devid: Option<u64>Device within the filesystem to resize, identified by btrfs device ID.
When None, the kernel defaults to device ID 1 (the first device).
amount: ResizeAmountHow much to grow, shrink, or set the device size to.
Implementations§
Source§impl ResizeArgs
impl ResizeArgs
Sourcepub fn new(amount: ResizeAmount) -> Self
pub fn new(amount: ResizeAmount) -> Self
Create a new ResizeArgs targeting the default device (ID 1) with the
given resize amount.
Sourcepub fn with_devid(self, devid: u64) -> Self
pub fn with_devid(self, devid: u64) -> Self
Set the target device ID for the resize operation.
Trait Implementations§
Source§impl Clone for ResizeArgs
impl Clone for ResizeArgs
Source§fn clone(&self) -> ResizeArgs
fn clone(&self) -> ResizeArgs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResizeArgs
impl Debug for ResizeArgs
Source§impl PartialEq for ResizeArgs
impl PartialEq for ResizeArgs
impl Copy for ResizeArgs
impl Eq for ResizeArgs
impl StructuralPartialEq for ResizeArgs
Auto Trait Implementations§
impl Freeze for ResizeArgs
impl RefUnwindSafe for ResizeArgs
impl Send for ResizeArgs
impl Sync for ResizeArgs
impl Unpin for ResizeArgs
impl UnsafeUnpin for ResizeArgs
impl UnwindSafe for ResizeArgs
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