pub struct JavaConfig { /* private fields */ }
Expand description
This struct represents a configuration for running a java program.
See JavaConfig::from_toml
for docs on how to create one.
Implementations§
Source§impl JavaConfig
impl JavaConfig
Sourcepub fn from_toml(conf: &Value) -> Result<JavaConfig, &'static str>
pub fn from_toml(conf: &Value) -> Result<JavaConfig, &'static str>
Required fields in the toml:
- “name”: A name for this test
- “tests_dir”: The directory to contain input and output data
- “main_class”: The class containing a public static void main(String[] args) method to be run.
Optional fields in the toml:
- “timeout”: Should be the number of seconds to allow before
timing out,
true
(use default timeout value), orfalse
(allow tested code to run however long it takes - not recommended). Default: 5 seconds - “args”: Should be an array of arguments to pass to the java program being tested. It will be passed directly to the String[] args in the java program. Default: empty array.
Trait Implementations§
Source§impl Config for JavaConfig
impl Config for JavaConfig
Source§fn case_timeout(&self) -> &Option<Duration>
fn case_timeout(&self) -> &Option<Duration>
The amount of time to let code run before timing out
Auto Trait Implementations§
impl Freeze for JavaConfig
impl RefUnwindSafe for JavaConfig
impl !Send for JavaConfig
impl !Sync for JavaConfig
impl Unpin for JavaConfig
impl UnwindSafe for JavaConfig
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