Struct bspc::Options

source ·
pub struct Options {
    pub verbose: bool,
    pub threads: Option<usize>,
    pub cancellation_token: Option<CancellationToken>,
    pub log_stream: Option<MpscSender<LogLine>>,
    pub additional_args: Vec<OsString>,
}
Expand description

Options for the conversion process.

Some of these are passed directly to the BSPC executable.

Fields

verbose: bool

Whether to use verbose logging.

If this is false, then the -noverbose flag will be passed to the BSPC executable.

threads: Option<usize>

The number of threads to use for the conversion. By default, multi-threading is disabled (equivalent to setting this to 1).

This is passed to the BSPC executable via the -threads flag.

cancellation_token: Option<CancellationToken>

A cancellation token that can be used to cancel the conversion (instead of dropping the future). See the docs on convert for more information.

log_stream: Option<MpscSender<LogLine>>

An optional channel to send log lines to as they get logged.

additional_args: Vec<OsString>

Additional command-line arguments to pass to the BSPC executable. These are added at the end, after all other arguments.

Implementations

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

Returns the argument unchanged.

Calls U::from(self).

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

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.