pub enum Update {
ElapsedInMove(f32),
Remaining(f32),
}Expand description
An update to a chess timer, based either on the new total seconds remaining or the seconds elapsed during the turn.
Variants§
Implementations§
Source§impl Update
impl Update
Sourcepub fn read_annotation(annotation: &str) -> Result<Self, Err>
pub fn read_annotation(annotation: &str) -> Result<Self, Err>
Reads a clock annotation in [%clk 0:00:00.0] format, returning Self::Remaining.
§Errors
Returns an error if annotation does not match format.
Sourcepub fn write_annotation(time: f32) -> CompactString
pub fn write_annotation(time: f32) -> CompactString
Writes a clock annotation in [%clk 0:00:00.0] format.
Trait Implementations§
Source§impl PartialOrd for Update
impl PartialOrd for Update
impl Copy for Update
impl StructuralPartialEq for Update
Auto Trait Implementations§
impl Freeze for Update
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnwindSafe for Update
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more