pub struct InitializationOptions {
pub license: Option<String>,
pub checkout_license: bool,
pub register_main_thread_handler: bool,
pub floating_license_duration: Duration,
pub bundled_plugin_directory: PathBuf,
pub user_plugins: bool,
pub repo_plugins: bool,
}
Fields§
§license: Option<String>
A license to override with, you can use this to make sure you initialize with a specific license.
checkout_license: bool
If you need to make sure that you do not check out a license set this to false.
This is really only useful if you have a headless license but are using an enterprise enabled core.
register_main_thread_handler: bool
Whether to register the default main thread handler.
Set this to false if you have your own main thread handler.
floating_license_duration: Duration
How long you want to check out for.
bundled_plugin_directory: PathBuf
The bundled plugin directory to use.
user_plugins: bool
Whether to initialize user plugins.
Set this to false if your use might be impacted by a user installed plugin.
repo_plugins: bool
Whether to initialize repo plugins.
Set this to false if your use might be impacted by a repo installed plugin.
Implementations§
source§impl InitializationOptions
impl InitializationOptions
pub fn new() -> Self
sourcepub fn with_license(self, license: impl Into<String>) -> Self
pub fn with_license(self, license: impl Into<String>) -> Self
A license to override with, you can use this to make sure you initialize with a specific license.
This takes the form of a JSON array. The string should be formed like:
[{ /* json object with license data */ }]
sourcepub fn with_license_checkout(self, should_checkout: bool) -> Self
pub fn with_license_checkout(self, should_checkout: bool) -> Self
If you need to make sure that you do not check out a license set this to false.
This is really only useful if you have a headless license but are using an enterprise enabled core.
sourcepub fn with_main_thread_handler(self, should_register: bool) -> Self
pub fn with_main_thread_handler(self, should_register: bool) -> Self
Whether to register the default main thread handler.
Set this to false if you have your own main thread handler.
sourcepub fn with_floating_license_duration(self, duration: Duration) -> Self
pub fn with_floating_license_duration(self, duration: Duration) -> Self
How long you want to check out for, only used if you are using a floating license.
sourcepub fn with_user_plugins(self, should_initialize: bool) -> Self
pub fn with_user_plugins(self, should_initialize: bool) -> Self
Set this to false if your use might be impacted by a user installed plugin.
sourcepub fn with_repo_plugins(self, should_initialize: bool) -> Self
pub fn with_repo_plugins(self, should_initialize: bool) -> Self
Set this to false if your use might be impacted by a repo installed plugin.
Trait Implementations§
source§impl Clone for InitializationOptions
impl Clone for InitializationOptions
source§fn clone(&self) -> InitializationOptions
fn clone(&self) -> InitializationOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more