Struct Options

Source
pub struct Options {
    pub verbose: bool,
    pub threads: Option<usize>,
    pub cancellation_token: Option<CancellationToken>,
    pub log_stream: Option<Sender<LogLine>>,
    pub additional_args: Vec<OsString>,
    pub log_command: bool,
}
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<Sender<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.

§log_command: bool

Whether to log the command that is being executed.

Implementations§

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, 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.