Struct bspc::OptionsBuilder
source · pub struct OptionsBuilder { /* private fields */ }Expand description
Builder for Options.
Implementations
sourceimpl 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.
sourceimpl OptionsBuilder
impl OptionsBuilder
pub fn build(&mut self) -> Options
sourcepub fn additional_args<I, S>(&mut self, args: I) -> &mut Selfwhere
I: IntoIterator<Item = S>,
S: Into<OsString>,
pub fn additional_args<I, S>(&mut self, args: I) -> &mut Selfwhere
I: IntoIterator<Item = S>,
S: Into<OsString>,
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 Selfwhere
S: Into<OsString>,
pub fn additional_arg<S>(&mut self, arg: S) -> &mut Selfwhere
S: Into<OsString>,
Adds an additional command-line argument to pass to the BSPC executable. This is added at the end, after all other arguments.
Trait Implementations
sourceimpl Clone for OptionsBuilder
impl Clone for OptionsBuilder
sourcefn clone(&self) -> OptionsBuilder
fn clone(&self) -> OptionsBuilder
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more