Struct rust_jni::InitArguments [−][src]
pub struct InitArguments { /* fields omitted */ }
Arguments for creating a Java VM.
Example
use rust_jni::{InitArguments, JniVersion, JvmOption, JvmVerboseOption}; let options = InitArguments::get_default(JniVersion::V8).unwrap() .with_option(JvmOption::Unknown("-Xgc:parallel".to_owned())) .with_option(JvmOption::Verbose(JvmVerboseOption::Gc)); assert_eq!(options.version(), JniVersion::V8);
Methods
impl InitArguments
[src]
impl InitArguments
pub fn get_default(version: JniVersion) -> Option<Self>
[src]
pub fn get_default(version: JniVersion) -> Option<Self>
Get default Java VM init arguments for a JNI version.
If the requested JNI version is not supported, returns
None
.
pub fn get_default_or_closest_supported(version: JniVersion) -> Self
[src]
pub fn get_default_or_closest_supported(version: JniVersion) -> Self
Get default Java VM init arguments for a JNI version.
If the requested JNI version is not supported, returns default arguments for the closest
supported JNI version. The new version can be obtained with the
InitArguments::version()
method.
pub fn get_latest_default() -> Self
[src]
pub fn get_latest_default() -> Self
Get default init arguments for the latest supported JNI version.
pub fn with_options(self, options: &[JvmOption]) -> Self
[src]
pub fn with_options(self, options: &[JvmOption]) -> Self
Add init options to the Java VM init arguments.
pub fn with_option(self, option: JvmOption) -> Self
[src]
pub fn with_option(self, option: JvmOption) -> Self
Add an init option to the Java VM init arguments.
pub fn unchecked(self) -> Self
[src]
pub fn unchecked(self) -> Self
Disable checking JNI calls for correctness.
pub fn checked(self) -> Self
[src]
pub fn checked(self) -> Self
Enable checking JNI calls for correctness.
This is a default. Only needed to be called if checking JNI calls was explicitly disabled.
pub fn ignore_unrecognized_options(self) -> Self
[src]
pub fn ignore_unrecognized_options(self) -> Self
Request for JVM to ignore unrecognized options on startup.
pub fn fail_on_unrecognized_options(self) -> Self
[src]
pub fn fail_on_unrecognized_options(self) -> Self
Request for JVM to fail in presence of unrecognized options on startup.
pub fn version(&self) -> JniVersion
[src]
pub fn version(&self) -> JniVersion
Return the JNI version these arguments will request when creating a Java VM.
Trait Implementations
impl Debug for InitArguments
[src]
impl Debug for InitArguments
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for InitArguments
[src]
impl Clone for InitArguments
fn clone(&self) -> InitArguments
[src]
fn clone(&self) -> InitArguments
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for InitArguments
[src]
impl PartialEq for InitArguments
fn eq(&self, other: &InitArguments) -> bool
[src]
fn eq(&self, other: &InitArguments) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &InitArguments) -> bool
[src]
fn ne(&self, other: &InitArguments) -> bool
This method tests for !=
.
impl Eq for InitArguments
[src]
impl Eq for InitArguments
Auto Trait Implementations
impl Send for InitArguments
impl Send for InitArguments
impl Sync for InitArguments
impl Sync for InitArguments