pub struct System<'a> { /* private fields */ }
Expand description
Wrapper around java.lang.System
Implementations
sourceimpl<'a> System<'a>
impl<'a> System<'a>
sourcepub fn clear_property<S: AsRef<str>>(&self, key: S) -> Result<Option<String>>
pub fn clear_property<S: AsRef<str>>(&self, key: S) -> Result<Option<String>>
Removes the system property indicated by the specified key.
sourcepub fn current_time_millis(&self) -> Result<i64>
pub fn current_time_millis(&self) -> Result<i64>
Returns the current time in milliseconds.
sourcepub fn exit(&self, status: i32) -> Result<()>
pub fn exit(&self, status: i32) -> Result<()>
Terminates the currently running Java Virtual Machine.
sourcepub fn get_env(&self) -> Result<Map<'a>>
pub fn get_env(&self) -> Result<Map<'a>>
Returns an unmodifiable string map view of the current system environment.
sourcepub fn get_env_with_name<S: AsRef<str>>(
&self,
name: S
) -> Result<Option<String>>
pub fn get_env_with_name<S: AsRef<str>>(
&self,
name: S
) -> Result<Option<String>>
Gets the value of the specified environment variable.
sourcepub fn get_property<S: AsRef<str>>(&self, key: S) -> Result<Option<String>>
pub fn get_property<S: AsRef<str>>(&self, key: S) -> Result<Option<String>>
Gets the system property indicated by the specified key.
sourcepub fn line_separator(&self) -> Result<String>
pub fn line_separator(&self) -> Result<String>
Returns the system-dependent line separator string.
sourcepub fn load<S: AsRef<str>>(&self, filename: S) -> Result<()>
pub fn load<S: AsRef<str>>(&self, filename: S) -> Result<()>
Loads a code file with the specified filename from the local file system as a dynamic library.
sourcepub fn load_library<S: AsRef<str>>(&self, libname: S) -> Result<()>
pub fn load_library<S: AsRef<str>>(&self, libname: S) -> Result<()>
Loads the system library specified by the libname argument.
sourcepub fn nano_time(&self) -> Result<i64>
pub fn nano_time(&self) -> Result<i64>
Returns the current value of the running Java Virtual Machine’s high-resolution time source, in nanoseconds.
sourcepub fn run_finalization(&self) -> Result<()>
pub fn run_finalization(&self) -> Result<()>
Runs the finalization methods of any objects pending finalization.
Auto Trait Implementations
impl<'a> RefUnwindSafe for System<'a>
impl<'a> !Send for System<'a>
impl<'a> !Sync for System<'a>
impl<'a> Unpin for System<'a>
impl<'a> UnwindSafe for System<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more