pub struct OptionsBuilder { /* private fields */ }
Expand description
Builder for Options
.
Implementations§
Source§impl OptionsBuilder
impl OptionsBuilder
Sourcepub fn verbose(&mut self, value: bool) -> &mut Self
pub fn verbose(&mut self, value: bool) -> &mut Self
Whether to use verbose logging.
If this is false
, then the -noverbose
flag will be passed to the
BSPC executable.
Sourcepub fn threads(&mut self, value: usize) -> &mut Self
pub fn threads(&mut self, value: usize) -> &mut Self
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.
Sourcepub fn cancellation_token(&mut self, value: CancellationToken) -> &mut Self
pub fn cancellation_token(&mut self, value: CancellationToken) -> &mut Self
A cancellation token that can be used to cancel the conversion
(instead of dropping the future). See the docs on convert
for
more information.
Sourcepub fn log_stream(&mut self, value: MpscSender<LogLine>) -> &mut Self
pub fn log_stream(&mut self, value: MpscSender<LogLine>) -> &mut Self
An optional channel to send log lines to as they get logged.
Sourcepub fn log_command(&mut self, value: bool) -> &mut Self
pub fn log_command(&mut self, value: bool) -> &mut Self
Whether to log the command that is being executed.
Source§impl OptionsBuilder
impl OptionsBuilder
pub fn build(&mut self) -> Options
Sourcepub fn additional_args<I, S>(&mut self, args: I) -> &mut Self
pub fn additional_args<I, S>(&mut self, args: I) -> &mut Self
Adds additional command-line arguments to pass to the BSPC executable. These are added at the end, after all other arguments.
Sourcepub fn additional_arg<S>(&mut self, arg: S) -> &mut Self
pub fn additional_arg<S>(&mut self, arg: S) -> &mut Self
Adds an additional command-line argument to pass to the BSPC executable. This is added at the end, after all other arguments.
Trait Implementations§
Source§impl Clone for OptionsBuilder
impl Clone for OptionsBuilder
Source§fn clone(&self) -> OptionsBuilder
fn clone(&self) -> OptionsBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more