pub struct Ordinal<N, NE, E, SE, S, SW, W, NW> {
pub north: N,
pub north_east: NE,
pub east: E,
pub south_east: SE,
pub south: S,
pub south_west: SW,
pub west: W,
pub north_west: NW,
}Available on crate feature
input_bei and (crate features input_bei or input_native or leafwing) only.Expand description
A preset to 8 map buttons as 2-dimensional input.
Fields§
§north: N§north_east: NE§east: E§south_east: SE§south: S§south_west: SW§west: W§north_west: NWImplementations§
Source§impl Ordinal<Binding, Binding, Binding, Binding, Binding, Binding, Binding, Binding>
impl Ordinal<Binding, Binding, Binding, Binding, Binding, Binding, Binding, Binding>
Sourcepub fn numpad() -> Ordinal<Binding, Binding, Binding, Binding, Binding, Binding, Binding, Binding>
pub fn numpad() -> Ordinal<Binding, Binding, Binding, Binding, Binding, Binding, Binding, Binding>
Maps numpad keys as 2-dimensional input.
Sourcepub fn new(
north: impl Into<Binding>,
north_east: impl Into<Binding>,
east: impl Into<Binding>,
south_east: impl Into<Binding>,
south: impl Into<Binding>,
south_west: impl Into<Binding>,
west: impl Into<Binding>,
north_west: impl Into<Binding>,
) -> Ordinal<Binding, Binding, Binding, Binding, Binding, Binding, Binding, Binding>
pub fn new( north: impl Into<Binding>, north_east: impl Into<Binding>, east: impl Into<Binding>, south_east: impl Into<Binding>, south: impl Into<Binding>, south_west: impl Into<Binding>, west: impl Into<Binding>, north_west: impl Into<Binding>, ) -> Ordinal<Binding, Binding, Binding, Binding, Binding, Binding, Binding, Binding>
Maps 8 bindings as 2-dimensional input.
NW N NE
🡴 🡱 🡵
W 🡰 · 🡲 E
🡷 🡳 🡶
SW S SETrait Implementations§
impl<N, NE, E, SE, S, SW, W, NW> Copy for Ordinal<N, NE, E, SE, S, SW, W, NW>
Source§impl<N, NE, E, SE, S, SW, W, NW> SpawnableList<BindingOf> for Ordinal<N, NE, E, SE, S, SW, W, NW>
impl<N, NE, E, SE, S, SW, W, NW> SpawnableList<BindingOf> for Ordinal<N, NE, E, SE, S, SW, W, NW>
Source§fn spawn(
this: MovingPtr<'_, Ordinal<N, NE, E, SE, S, SW, W, NW>>,
world: &mut World,
entity: Entity,
)
fn spawn( this: MovingPtr<'_, Ordinal<N, NE, E, SE, S, SW, W, NW>>, world: &mut World, entity: Entity, )
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Returns a size hint, which is used to reserve space for this list in a
RelationshipTarget. This should be
less than or equal to the actual size of the list. When in doubt, just use 0.Auto Trait Implementations§
impl<N, NE, E, SE, S, SW, W, NW> Freeze for Ordinal<N, NE, E, SE, S, SW, W, NW>
impl<N, NE, E, SE, S, SW, W, NW> RefUnwindSafe for Ordinal<N, NE, E, SE, S, SW, W, NW>where
N: RefUnwindSafe,
NE: RefUnwindSafe,
E: RefUnwindSafe,
SE: RefUnwindSafe,
S: RefUnwindSafe,
SW: RefUnwindSafe,
W: RefUnwindSafe,
NW: RefUnwindSafe,
impl<N, NE, E, SE, S, SW, W, NW> Send for Ordinal<N, NE, E, SE, S, SW, W, NW>
impl<N, NE, E, SE, S, SW, W, NW> Sync for Ordinal<N, NE, E, SE, S, SW, W, NW>
impl<N, NE, E, SE, S, SW, W, NW> Unpin for Ordinal<N, NE, E, SE, S, SW, W, NW>
impl<N, NE, E, SE, S, SW, W, NW> UnsafeUnpin for Ordinal<N, NE, E, SE, S, SW, W, NW>where
N: UnsafeUnpin,
NE: UnsafeUnpin,
E: UnsafeUnpin,
SE: UnsafeUnpin,
S: UnsafeUnpin,
SW: UnsafeUnpin,
W: UnsafeUnpin,
NW: UnsafeUnpin,
impl<N, NE, E, SE, S, SW, W, NW> UnwindSafe for Ordinal<N, NE, E, SE, S, SW, W, NW>where
N: UnwindSafe,
NE: UnwindSafe,
E: UnwindSafe,
SE: UnwindSafe,
S: UnwindSafe,
SW: UnwindSafe,
W: UnwindSafe,
NW: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T, U> Captures<U> for Twhere
T: ?Sized,
impl<T> Channel for T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
impl<T> Message for T
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
impl<T> Send for Twhere
T: Send,
impl<T> Settings for T
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
impl<T> Sync for Twhere
T: Sync,
Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
impl<T> WasmNotSend for Twhere
T: Send,
impl<T> WasmNotSendSync for Twhere
T: WasmNotSend + WasmNotSync,
impl<T> WasmNotSync for Twhere
T: Sync,
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.