Struct scl_core::java::JavaRuntime
source · pub struct JavaRuntime { /* private fields */ }
Expand description
一个 Java 运行时类型
Implementations§
source§impl JavaRuntime
impl JavaRuntime
sourcepub async fn from_java_path(java_path: impl AsRef<OsStr>) -> Result<Self>
pub async fn from_java_path(java_path: impl AsRef<OsStr>) -> Result<Self>
通过一个指向 Java 可执行文件的路径来创建 JavaRuntime
在此会尝试运行这个文件并获取相关的版本信息,确认无误后返回
sourcepub fn main_version(&self) -> u8
pub fn main_version(&self) -> u8
获取此 Java 运行时的主 Java 版本号
Trait Implementations§
source§impl Clone for JavaRuntime
impl Clone for JavaRuntime
source§fn clone(&self) -> JavaRuntime
fn clone(&self) -> JavaRuntime
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for JavaRuntime
impl Send for JavaRuntime
impl Sync for JavaRuntime
impl Unpin for JavaRuntime
impl UnwindSafe for JavaRuntime
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
Mutably borrows from an owned value. Read more