smart_keymap::tuples

Struct Keys2

Source
pub struct Keys2<K0: Key<Context = Ctx, Event = Ev, PressedKey = PK>, K1: Key<Context = Ctx, Event = Ev, PressedKey = PK>, Ctx, Ev, PK, const M: usize = { crate::key::MAX_KEY_EVENTS }>(/* private fields */);
Expand description

A tuple struct for some number of keys.

Implementations§

Source§

impl<K0: Key<Context = Ctx, Event = Ev, PressedKey = PK> + Copy, K1: Key<Context = Ctx, Event = Ev, PressedKey = PK> + Copy, Ctx, Ev, PK, const M: usize> Keys2<K0, K1, Ctx, Ev, PK, M>

Source

pub const fn new((k0, k1): (K0, K1)) -> Self

Constructs a KeysN tuple struct with the given tuple.

Trait Implementations§

Source§

impl<K0: Debug + Key<Context = Ctx, Event = Ev, PressedKey = PK>, K1: Debug + Key<Context = Ctx, Event = Ev, PressedKey = PK>, Ctx: Debug, Ev: Debug, PK: Debug, const M: usize> Debug for Keys2<K0, K1, Ctx, Ev, PK, M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K0: Key<Context = Ctx, Event = Ev, PressedKey = PK> + 'static, K1: Key<Context = Ctx, Event = Ev, PressedKey = PK> + 'static, Ctx, Ev, PK, const M: usize> Index<usize> for Keys2<K0, K1, Ctx, Ev, PK, M>

Source§

type Output = dyn Key<Context = Ctx, Event = Ev, PressedKey = PK>

The returned type after indexing.
Source§

fn index(&self, idx: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<K0: Key<Context = Ctx, Event = Ev, PressedKey = PK> + 'static, K1: Key<Context = Ctx, Event = Ev, PressedKey = PK> + 'static, Ctx, Ev, PK, const M: usize> IndexMut<usize> for Keys2<K0, K1, Ctx, Ev, PK, M>

Source§

fn index_mut(&mut self, idx: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl<K0, K1, Ctx, Ev, PK, const M: usize> Freeze for Keys2<K0, K1, Ctx, Ev, PK, M>
where K0: Freeze, K1: Freeze,

§

impl<K0, K1, Ctx, Ev, PK, const M: usize> RefUnwindSafe for Keys2<K0, K1, Ctx, Ev, PK, M>

§

impl<K0, K1, Ctx, Ev, PK, const M: usize> Send for Keys2<K0, K1, Ctx, Ev, PK, M>
where K0: Send, K1: Send,

§

impl<K0, K1, Ctx, Ev, PK, const M: usize> Sync for Keys2<K0, K1, Ctx, Ev, PK, M>
where K0: Sync, K1: Sync,

§

impl<K0, K1, Ctx, Ev, PK, const M: usize> Unpin for Keys2<K0, K1, Ctx, Ev, PK, M>
where K0: Unpin, K1: Unpin,

§

impl<K0, K1, Ctx, Ev, PK, const M: usize> UnwindSafe for Keys2<K0, K1, Ctx, Ev, PK, M>
where K0: UnwindSafe, K1: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.