ragnarok::source

Trait SourceEvent

Source
pub trait SourceEvent: Clone + PartialEq {
    type Name: NameOfEvent;

    // Required methods
    fn is_pressed(&self) -> bool;
    fn is_moved(&self) -> bool;
    fn try_cursor(&self) -> Option<CursorPoint>;
    fn as_event_name(&self) -> Self::Name;
}

Required Associated Types§

Required Methods§

Source

fn is_pressed(&self) -> bool

Source

fn is_moved(&self) -> bool

Source

fn try_cursor(&self) -> Option<CursorPoint>

Source

fn as_event_name(&self) -> Self::Name

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§