pub struct Benchmark { /* private fields */ }Expand description
The anvil.benchmark service.
Implementations§
Source§impl Benchmark
impl Benchmark
Sourcepub fn c_api(&self) -> Table<AnvilBenchmarkService>
pub fn c_api(&self) -> Table<AnvilBenchmarkService>
The C table, for what this crate does not wrap.
Sourcepub fn declare(&self, fields: &[Field<'_>]) -> Result<()>
pub fn declare(&self, fields: &[Field<'_>]) -> Result<()>
Declares fields, all or none of them; inside load only. Any call,
a refused one included, makes the plugin a participant.
Sourcepub fn set_int(&self, field: &str, value: i64) -> Result<()>
pub fn set_int(&self, field: &str, value: i64) -> Result<()>
Sets an int field; the last value wins.
Sourcepub fn set_enum(&self, field: &str, option: &str) -> Result<()>
pub fn set_enum(&self, field: &str, option: &str) -> Result<()>
Sets an enum field to one of its options.
Sourcepub fn done(&self) -> Result<()>
pub fn done(&self) -> Result<()>
The participant’s work after ready is finished; later values are refused. Calling it again does nothing.
Trait Implementations§
impl Copy for Benchmark
impl Send for Benchmark
impl Sync for Benchmark
Auto Trait Implementations§
impl Forget for Benchmark
impl Freeze for Benchmark
impl Move for Benchmark
impl RefUnwindSafe for Benchmark
impl Unpin for Benchmark
impl UnsafeUnpin for Benchmark
impl UnwindSafe for Benchmark
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