smart_keymap::tuples

Struct Keys4

Source
pub struct Keys4<K0: Key<Context = Ctx, Event = Ev, PressedKey = PK>, K1: Key<Context = Ctx, Event = Ev, PressedKey = PK>, K2: Key<Context = Ctx, Event = Ev, PressedKey = PK>, K3: 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, K2: Key<Context = Ctx, Event = Ev, PressedKey = PK> + Copy, K3: Key<Context = Ctx, Event = Ev, PressedKey = PK> + Copy, Ctx, Ev, PK, const M: usize> Keys4<K0, K1, K2, K3, Ctx, Ev, PK, M>

Source

pub const fn new((k0, k1, k2, k3): (K0, K1, K2, K3)) -> 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>, K2: Debug + Key<Context = Ctx, Event = Ev, PressedKey = PK>, K3: Debug + Key<Context = Ctx, Event = Ev, PressedKey = PK>, Ctx: Debug, Ev: Debug, PK: Debug, const M: usize> Debug for Keys4<K0, K1, K2, K3, 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, K2: Key<Context = Ctx, Event = Ev, PressedKey = PK> + 'static, K3: Key<Context = Ctx, Event = Ev, PressedKey = PK> + 'static, Ctx, Ev, PK, const M: usize> Index<usize> for Keys4<K0, K1, K2, K3, 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, K2: Key<Context = Ctx, Event = Ev, PressedKey = PK> + 'static, K3: Key<Context = Ctx, Event = Ev, PressedKey = PK> + 'static, Ctx, Ev, PK, const M: usize> IndexMut<usize> for Keys4<K0, K1, K2, K3, 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, K2, K3, Ctx, Ev, PK, const M: usize> Freeze for Keys4<K0, K1, K2, K3, Ctx, Ev, PK, M>
where K0: Freeze, K1: Freeze, K2: Freeze, K3: Freeze,

§

impl<K0, K1, K2, K3, Ctx, Ev, PK, const M: usize> RefUnwindSafe for Keys4<K0, K1, K2, K3, Ctx, Ev, PK, M>

§

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

§

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

§

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

§

impl<K0, K1, K2, K3, Ctx, Ev, PK, const M: usize> UnwindSafe for Keys4<K0, K1, K2, K3, Ctx, Ev, PK, M>
where K0: UnwindSafe, K1: UnwindSafe, K2: UnwindSafe, K3: 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.