[−][src]Struct unsegen::input::NavigateBehavior
Collection of triggers for functions of something Navigatable
implementing Behavior
.
Implementations
impl<'a, N: Navigatable + 'a> NavigateBehavior<'a, N>
[src]
pub fn new(navigatable: &'a mut N) -> Self
[src]
Create the behavior to act on the provided Navigatable
. Add triggers using other functions!
pub fn up_on<E: ToEvent>(self, event: E) -> Self
[src]
Make the behavior trigger the move_up
function on the provided event.
A typical candidate for event
would be Key::Up
.
pub fn down_on<E: ToEvent>(self, event: E) -> Self
[src]
Make the behavior trigger the move_down
function on the provided event.
A typical candidate for event
would be Key::Down
.
pub fn left_on<E: ToEvent>(self, event: E) -> Self
[src]
Make the behavior trigger the move_left
function on the provided event.
A typical candidate for event
would be Key::Left
.
pub fn right_on<E: ToEvent>(self, event: E) -> Self
[src]
Make the behavior trigger the move_right
function on the provided event.
A typical candidate for event
would be Key::Right
.
Trait Implementations
impl<'a, N: Navigatable + 'a> Behavior for NavigateBehavior<'a, N>
[src]
Auto Trait Implementations
impl<'a, N> RefUnwindSafe for NavigateBehavior<'a, N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<'a, N> Send for NavigateBehavior<'a, N> where
N: Send,
N: Send,
impl<'a, N> Sync for NavigateBehavior<'a, N> where
N: Sync,
N: Sync,
impl<'a, N> Unpin for NavigateBehavior<'a, N>
impl<'a, N> !UnwindSafe for NavigateBehavior<'a, N>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<F> Behavior for F where
F: FnOnce(Input) -> Option<Input>,
[src]
F: FnOnce(Input) -> Option<Input>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,