[][src]Struct unsegen::input::ScrollBehavior

pub struct ScrollBehavior<'a, S: Scrollable + 'a> { /* fields omitted */ }

Collection of triggers for functions of something Scrollable implementing Behavior.

Methods

impl<'a, S: Scrollable> ScrollBehavior<'a, S>[src]

pub fn new(scrollable: &'a mut S) -> Self[src]

Create the behavior to act on the provided ´Scrollable`. Add triggers using other functions!

pub fn to_beginning_on<E: ToEvent>(self, event: E) -> Self[src]

Make the behavior trigger the scroll_to_beginning function on the provided event.

pub fn to_end_on<E: ToEvent>(self, event: E) -> Self[src]

Make the behavior trigger the scroll_to_end function on the provided event.

pub fn backwards_on<E: ToEvent>(self, event: E) -> Self[src]

Make the behavior trigger the scroll_backwards function on the provided event.

pub fn forwards_on<E: ToEvent>(self, event: E) -> Self[src]

Make the behavior trigger the scroll_forwards function on the provided event.

Trait Implementations

impl<'a, S: Scrollable> Behavior for ScrollBehavior<'a, S>[src]

Auto Trait Implementations

impl<'a, S> Send for ScrollBehavior<'a, S> where
    S: Send

impl<'a, S> Sync for ScrollBehavior<'a, S> where
    S: Sync

Blanket Implementations

impl<F> Behavior for F where
    F: FnOnce(Input) -> Option<Input>, 
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.