pub enum Press {
Digit(u8),
Point,
Op(Op),
Equals,
Percent,
Negate,
Backspace,
Clear,
}Expand description
A key of the calculator.
Variants§
Digit(u8)
A digit from 0 to 9.
Point
The decimal point.
Op(Op)
An operation between two numbers.
Equals
Runs the pending operation; pressed again, repeats it.
Percent
Turns the number on display into a percentage.
Negate
Changes the sign of the number on display.
Backspace
Erases the last digit typed.
Clear
Starts over.
Trait Implementations§
impl Copy for Press
impl Eq for Press
impl StructuralPartialEq for Press
Auto Trait Implementations§
impl Freeze for Press
impl RefUnwindSafe for Press
impl Send for Press
impl Sync for Press
impl Unpin for Press
impl UnsafeUnpin for Press
impl UnwindSafe for Press
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.