Add optional Serde implementations and missing derivable traits (#652)
* Add optional serde feature * Document features in README * Add changelog entry * Implement some missing derivable traits * Add changelog entry for std derives * Remove extraneous space on serde doc comments * Add period to end of serde line in readme * Remove serde impls from WindowAttributes * Add serde impls for TouchPhase * Add serde test file * Add feature lines to testing CIs * Remove WindowAttributes from changelog
This commit is contained in:
parent
214e157e5d
commit
6bec912961
9 changed files with 79 additions and 8 deletions
|
|
@ -92,6 +92,9 @@ extern crate libc;
|
|||
extern crate log;
|
||||
#[cfg(feature = "icon_loading")]
|
||||
extern crate image;
|
||||
#[cfg(feature = "serde")]
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
extern crate winapi;
|
||||
|
|
@ -199,7 +202,8 @@ impl std::fmt::Debug for EventsLoop {
|
|||
/// Returned by the user callback given to the `EventsLoop::run_forever` method.
|
||||
///
|
||||
/// Indicates whether the `run_forever` method should continue or complete.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub enum ControlFlow {
|
||||
/// Continue looping and waiting for events.
|
||||
Continue,
|
||||
|
|
@ -357,7 +361,8 @@ impl std::error::Error for CreationError {
|
|||
}
|
||||
|
||||
/// Describes the appearance of the mouse cursor.
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub enum MouseCursor {
|
||||
/// The platform-dependent default cursor.
|
||||
Default,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue