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: boolIf 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: boolWhether to register the default main thread handler.
Set this to false if you have your own main thread handler.
floating_license_duration: DurationHow long you want to check out for.
bundled_plugin_directory: PathBufThe bundled plugin directory to use.
user_plugins: boolWhether to initialize user plugins.
Set this to false if your use might be impacted by a user-installed plugin.
repo_plugins: boolWhether 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 moreSource§impl Debug for InitializationOptions
impl Debug for InitializationOptions
Source§impl Default for InitializationOptions
impl Default for InitializationOptions
Source§impl Hash for InitializationOptions
impl Hash for InitializationOptions
Source§impl PartialEq for InitializationOptions
impl PartialEq for InitializationOptions
impl Eq for InitializationOptions
impl StructuralPartialEq for InitializationOptions
Auto Trait Implementations§
impl Freeze for InitializationOptions
impl RefUnwindSafe for InitializationOptions
impl Send for InitializationOptions
impl Sync for InitializationOptions
impl Unpin for InitializationOptions
impl UnwindSafe for InitializationOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more