pub struct Finger {
pub hand: Hand,
pub kind: FingerKind,
}Fields§
§hand: Hand§kind: FingerKindImplementations§
Source§impl Finger
impl Finger
pub fn new(hand: Hand, kind: FingerKind) -> Finger
Sourcepub fn dir_to(self, f: Finger) -> Direction
pub fn dir_to(self, f: Finger) -> Direction
Returns the direction between self and the argument f.
use keynergy::{Finger, Hand, FingerKind, Direction};
let ri = Finger::new(Hand::Right, FingerKind::Index);
let rm = Finger::new(Hand::Right, FingerKind::Middle);
assert_eq!(Direction::Outward, ri.dir_to(rm));
assert_eq!(Direction::Inward, rm.dir_to(ri));
assert_eq!(Direction::None, ri.dir_to(ri));Trait Implementations§
impl Copy for Finger
impl Eq for Finger
impl StructuralPartialEq for Finger
Auto Trait Implementations§
impl Freeze for Finger
impl RefUnwindSafe for Finger
impl Send for Finger
impl Sync for Finger
impl Unpin for Finger
impl UnwindSafe for Finger
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