pub struct Turns { /* private fields */ }Implementations§
Source§impl Turns
impl Turns
pub fn new(threshold_ms: f64, queued: bool) -> Self
pub fn with_frozen(self, frozen: Frozen) -> Self
pub fn with_wall_ms(self, wall_ms: f64) -> Self
pub fn add(&mut self, submission_ms: f64) -> bool
pub fn time<R>(&mut self, submission: impl FnOnce() -> R) -> R
pub fn cpu<R>(&mut self, work: impl FnOnce() -> R) -> R
pub fn poll(&mut self) -> bool
pub fn turn(&mut self)
pub fn args(&self) -> Vec<String>
pub fn pending(&self) -> (f64, f64)
pub fn taken(&self) -> u32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Turns
impl RefUnwindSafe for Turns
impl Send for Turns
impl Sync for Turns
impl Unpin for Turns
impl UnsafeUnpin for Turns
impl UnwindSafe for Turns
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.