[−][src]Enum yy_typings::object_yy::EventType
Describes the current event type. Users can make most events freely, though
special care should be taken that Alarm
's .0 field is less than ALARM_MAX
,
and the same for the OtherEvent
's usize wrappers. To make sure some event
has been validly created, is_valid
has been provided.
Note: only serde_json serialization and deserialization is supported for EventType.
Yaml, and other text / WYSIWYG data formats should be fine, but Bincode and other binary
sequences are unlikely to succesfully serialize this. This is due to our use of serde's
flatten
, which runs afoul of this issue: https://github.com/servo/bincode/issues/245
Variants
Step(Stage)
Alarm(usize)
Draw(DrawEvent)
Mouse(MouseEvent)
KeyDown(VirtualKeyCode)
KeyPress(VirtualKeyCode)
KeyRelease(VirtualKeyCode)
Gesture(GestureEvent)
Other(OtherEvent)
Async(AsyncEvent)
Implementations
impl EventType
[src]
pub const ALARM_MAX: usize
[src]
The maximum number of alarms which are available in the Gms2 IDE.
pub fn filename(&self) -> (&'static str, usize)
[src]
Gets the filename for a given event with its requisite base. We return in this format to reduce allocating a string per call, as this filename will likely become allocated on some path in the future.
let (base_name, numeric_id) = EventType::Create;
assert_eq!(base_name, "Create_");
assert_eq!(numeric_id, 0);
pub fn parse_filename(
value: &str,
event_num: usize
) -> Result<EventType, EventTypeConvertErrors>
[src]
value: &str,
event_num: usize
) -> Result<EventType, EventTypeConvertErrors>
Parses a given filename and number into an EventType
, if valid.
pub fn is_valid(value: EventType) -> bool
[src]
Trait Implementations
impl Clone for EventType
[src]
impl Copy for EventType
[src]
impl Debug for EventType
[src]
impl Default for EventType
[src]
impl<'de> Deserialize<'de> for EventType
[src]
fn deserialize<D>(deserializer: D) -> Result<EventType, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for EventType
[src]
impl From<EventType> for EventIntermediary
[src]
impl Hash for EventType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for EventType
[src]
fn cmp(&self, other: &EventType) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<EventType> for EventType
[src]
impl PartialOrd<EventType> for EventType
[src]
fn partial_cmp(&self, other: &EventType) -> Option<Ordering>
[src]
fn lt(&self, other: &EventType) -> bool
[src]
fn le(&self, other: &EventType) -> bool
[src]
fn gt(&self, other: &EventType) -> bool
[src]
fn ge(&self, other: &EventType) -> bool
[src]
impl Serialize for EventType
[src]
impl StructuralEq for EventType
[src]
impl StructuralPartialEq for EventType
[src]
impl TryFrom<EventIntermediary> for EventType
[src]
type Error = EventTypeConvertErrors
The type returned in the event of a conversion error.
fn try_from(o: EventIntermediary) -> Result<Self, Self::Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnwindSafe for EventType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,