Struct shell_rs::truncate::Options[][src]

pub struct Options {
    pub no_create: bool,
    pub io_blocks: bool,
    pub reference: Option<PathBuf>,
    pub size: Option<String>,
}

Fields

no_create: bool

Do not create any files.

io_blocks: bool

Treat size as number of IO blocks instead of bytes.

reference: Option<PathBuf>

Base size on another file.

size: Option<String>

Set or adjust the file size by size bytes.

The size argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E, (powers of 1024) or KB,MB,… (powers of 1000). Binary prefixes can be used, too: KiB=K, MiB=M, and so on.

size may also be prefixed by one of the following modifying characters:

  • ‘+’ extend by
  • ‘-’ reduce by
  • ‘<’ at most
  • ‘>’ at least
  • ‘/’ round down to multiple of
  • ‘%’ round up to multiple of

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.