Use Default derive for enums
This commit is contained in:
parent
66ff4dbaad
commit
4fb051ba0f
@ -169,7 +169,7 @@ pub mod v3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The kind of account being registered.
|
/// The kind of account being registered.
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
pub enum RegistrationKind {
|
pub enum RegistrationKind {
|
||||||
@ -179,15 +179,10 @@ pub enum RegistrationKind {
|
|||||||
Guest,
|
Guest,
|
||||||
|
|
||||||
/// A regular user account
|
/// A regular user account
|
||||||
|
#[default]
|
||||||
User,
|
User,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for RegistrationKind {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::User
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The login type.
|
/// The login type.
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
|
@ -21,11 +21,12 @@ pub use self::{lazy_load::LazyLoadOptions, url::UrlFilter};
|
|||||||
|
|
||||||
/// Format to use for returned events.
|
/// Format to use for returned events.
|
||||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, StringEnum)]
|
||||||
#[ruma_enum(rename_all = "snake_case")]
|
#[ruma_enum(rename_all = "snake_case")]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum EventFormat {
|
pub enum EventFormat {
|
||||||
/// Client format, as described in the Client API.
|
/// Client format, as described in the Client API.
|
||||||
|
#[default]
|
||||||
Client,
|
Client,
|
||||||
|
|
||||||
/// Raw events from federation.
|
/// Raw events from federation.
|
||||||
@ -35,12 +36,6 @@ pub enum EventFormat {
|
|||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for EventFormat {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::Client
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Filters to be applied to room events.
|
/// Filters to be applied to room events.
|
||||||
#[derive(Clone, Debug, Default, Incoming, Serialize)]
|
#[derive(Clone, Debug, Default, Incoming, Serialize)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
|
@ -4,11 +4,12 @@ use serde::{ser::SerializeStruct as _, Deserialize, Serialize, Serializer};
|
|||||||
/// supported endpoints
|
/// supported endpoints
|
||||||
///
|
///
|
||||||
/// [lazy-loading]: https://spec.matrix.org/v1.2/client-server-api/#lazy-loading-room-members
|
/// [lazy-loading]: https://spec.matrix.org/v1.2/client-server-api/#lazy-loading-room-members
|
||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize)]
|
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Deserialize)]
|
||||||
#[serde(from = "LazyLoadJsonRepr")]
|
#[serde(from = "LazyLoadJsonRepr")]
|
||||||
#[allow(clippy::exhaustive_enums)]
|
#[allow(clippy::exhaustive_enums)]
|
||||||
pub enum LazyLoadOptions {
|
pub enum LazyLoadOptions {
|
||||||
/// Disables lazy-loading of membership events.
|
/// Disables lazy-loading of membership events.
|
||||||
|
#[default]
|
||||||
Disabled,
|
Disabled,
|
||||||
|
|
||||||
/// Enables lazy-loading of events.
|
/// Enables lazy-loading of events.
|
||||||
@ -28,13 +29,6 @@ impl LazyLoadOptions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for LazyLoadOptions {
|
|
||||||
/// `LazyLoadOptions::Disabled`
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::Disabled
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Serialize for LazyLoadOptions {
|
impl Serialize for LazyLoadOptions {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
|
@ -12,7 +12,7 @@ use crate::PrivOwnedStr;
|
|||||||
|
|
||||||
/// Whether or not a newly created room will be listed in the room directory.
|
/// Whether or not a newly created room will be listed in the room directory.
|
||||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, StringEnum)]
|
||||||
#[ruma_enum(rename_all = "snake_case")]
|
#[ruma_enum(rename_all = "snake_case")]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum Visibility {
|
pub enum Visibility {
|
||||||
@ -20,14 +20,9 @@ pub enum Visibility {
|
|||||||
Public,
|
Public,
|
||||||
|
|
||||||
/// Indicates that the room will not be shown in the published room list.
|
/// Indicates that the room will not be shown in the published room list.
|
||||||
|
#[default]
|
||||||
Private,
|
Private,
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Visibility {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::Private
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -142,7 +142,7 @@ impl From<SpaceHierarchyRoomsChunkInit> for SpaceHierarchyRoomsChunk {
|
|||||||
/// enum does not hold the conditions for joining restricted rooms. Instead, the server is assumed
|
/// enum does not hold the conditions for joining restricted rooms. Instead, the server is assumed
|
||||||
/// to only return rooms the user is allowed to join in a space hierarchy listing response.
|
/// to only return rooms the user is allowed to join in a space hierarchy listing response.
|
||||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, StringEnum)]
|
||||||
#[ruma_enum(rename_all = "snake_case")]
|
#[ruma_enum(rename_all = "snake_case")]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
pub enum SpaceRoomJoinRule {
|
pub enum SpaceRoomJoinRule {
|
||||||
@ -171,14 +171,9 @@ pub enum SpaceRoomJoinRule {
|
|||||||
KnockRestricted,
|
KnockRestricted,
|
||||||
|
|
||||||
/// Anyone can join the room without any prior action.
|
/// Anyone can join the room without any prior action.
|
||||||
|
#[default]
|
||||||
Public,
|
Public,
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for SpaceRoomJoinRule {
|
|
||||||
fn default() -> Self {
|
|
||||||
SpaceRoomJoinRule::Public
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -12,7 +12,7 @@ pub type CanonicalJsonObject = BTreeMap<String, CanonicalJsonValue>;
|
|||||||
|
|
||||||
/// Represents a canonical JSON value as per the Matrix specification.
|
/// Represents a canonical JSON value as per the Matrix specification.
|
||||||
#[cfg(feature = "canonical-json")]
|
#[cfg(feature = "canonical-json")]
|
||||||
#[derive(Clone, Eq, PartialEq)]
|
#[derive(Clone, Default, Eq, PartialEq)]
|
||||||
#[allow(clippy::exhaustive_enums)]
|
#[allow(clippy::exhaustive_enums)]
|
||||||
pub enum CanonicalJsonValue {
|
pub enum CanonicalJsonValue {
|
||||||
/// Represents a JSON null value.
|
/// Represents a JSON null value.
|
||||||
@ -22,6 +22,7 @@ pub enum CanonicalJsonValue {
|
|||||||
/// # use ruma_common::CanonicalJsonValue;
|
/// # use ruma_common::CanonicalJsonValue;
|
||||||
/// let v: CanonicalJsonValue = json!(null).try_into().unwrap();
|
/// let v: CanonicalJsonValue = json!(null).try_into().unwrap();
|
||||||
/// ```
|
/// ```
|
||||||
|
#[default]
|
||||||
Null,
|
Null,
|
||||||
|
|
||||||
/// Represents a JSON boolean.
|
/// Represents a JSON boolean.
|
||||||
@ -155,12 +156,6 @@ impl CanonicalJsonValue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for CanonicalJsonValue {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::Null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl fmt::Debug for CanonicalJsonValue {
|
impl fmt::Debug for CanonicalJsonValue {
|
||||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match *self {
|
match *self {
|
||||||
|
@ -185,7 +185,7 @@ impl<'a> Default for RoomNetwork<'a> {
|
|||||||
|
|
||||||
/// The rule used for users wishing to join a public room.
|
/// The rule used for users wishing to join a public room.
|
||||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, StringEnum)]
|
||||||
#[ruma_enum(rename_all = "snake_case")]
|
#[ruma_enum(rename_all = "snake_case")]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
pub enum PublicRoomJoinRule {
|
pub enum PublicRoomJoinRule {
|
||||||
@ -193,18 +193,13 @@ pub enum PublicRoomJoinRule {
|
|||||||
Knock,
|
Knock,
|
||||||
|
|
||||||
/// Anyone can join the room without any prior action.
|
/// Anyone can join the room without any prior action.
|
||||||
|
#[default]
|
||||||
Public,
|
Public,
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for PublicRoomJoinRule {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::Public
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// An enum of possible room types to filter.
|
/// An enum of possible room types to filter.
|
||||||
///
|
///
|
||||||
/// This type can hold an arbitrary string. To build this with a custom value, convert it from an
|
/// This type can hold an arbitrary string. To build this with a custom value, convert it from an
|
||||||
|
@ -86,6 +86,7 @@ impl CallHangupEventContent {
|
|||||||
/// `invite_timeout` for when the other party did not answer in time.
|
/// `invite_timeout` for when the other party did not answer in time.
|
||||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||||
|
#[cfg_attr(feature = "unstable-msc2746", derive(Default))]
|
||||||
#[ruma_enum(rename_all = "snake_case")]
|
#[ruma_enum(rename_all = "snake_case")]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum Reason {
|
pub enum Reason {
|
||||||
@ -105,6 +106,7 @@ pub enum Reason {
|
|||||||
|
|
||||||
/// The user chose to end the call.
|
/// The user chose to end the call.
|
||||||
#[cfg(feature = "unstable-msc2746")]
|
#[cfg(feature = "unstable-msc2746")]
|
||||||
|
#[default]
|
||||||
UserHangup,
|
UserHangup,
|
||||||
|
|
||||||
/// The client was unable to start capturing media in such a way as it is unable to continue
|
/// The client was unable to start capturing media in such a way as it is unable to continue
|
||||||
@ -146,10 +148,3 @@ impl Reason {
|
|||||||
Some(Self::default())
|
Some(Self::default())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "unstable-msc2746")]
|
|
||||||
impl Default for Reason {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::UserHangup
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -191,19 +191,14 @@ impl AssetContent {
|
|||||||
|
|
||||||
/// The type of an asset.
|
/// The type of an asset.
|
||||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, StringEnum)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, StringEnum)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum AssetType {
|
pub enum AssetType {
|
||||||
/// The asset is the sender of the event.
|
/// The asset is the sender of the event.
|
||||||
|
#[default]
|
||||||
#[ruma_enum(rename = "m.self")]
|
#[ruma_enum(rename = "m.self")]
|
||||||
Self_,
|
Self_,
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for AssetType {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::Self_
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -74,10 +74,11 @@ impl PollStartContent {
|
|||||||
|
|
||||||
/// The kind of poll.
|
/// The kind of poll.
|
||||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, StringEnum)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
pub enum PollKind {
|
pub enum PollKind {
|
||||||
/// The results are revealed once the poll is closed.
|
/// The results are revealed once the poll is closed.
|
||||||
|
#[default]
|
||||||
#[ruma_enum(rename = "org.matrix.msc3381.poll.undisclosed", alias = "m.poll.undisclosed")]
|
#[ruma_enum(rename = "org.matrix.msc3381.poll.undisclosed", alias = "m.poll.undisclosed")]
|
||||||
Undisclosed,
|
Undisclosed,
|
||||||
|
|
||||||
@ -89,12 +90,6 @@ pub enum PollKind {
|
|||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for PollKind {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::Undisclosed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The answers to a poll.
|
/// The answers to a poll.
|
||||||
///
|
///
|
||||||
/// Must include between 1 and 20 `PollAnswer`s.
|
/// Must include between 1 and 20 `PollAnswer`s.
|
||||||
|
@ -6,7 +6,7 @@ use crate::{serde::StringEnum, PrivOwnedStr};
|
|||||||
|
|
||||||
/// A description of a user's connectivity and availability for chat.
|
/// A description of a user's connectivity and availability for chat.
|
||||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, StringEnum)]
|
||||||
#[ruma_enum(rename_all = "snake_case")]
|
#[ruma_enum(rename_all = "snake_case")]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum PresenceState {
|
pub enum PresenceState {
|
||||||
@ -14,6 +14,7 @@ pub enum PresenceState {
|
|||||||
Offline,
|
Offline,
|
||||||
|
|
||||||
/// Connected to the service.
|
/// Connected to the service.
|
||||||
|
#[default]
|
||||||
Online,
|
Online,
|
||||||
|
|
||||||
/// Connected to the service but not available for chat.
|
/// Connected to the service but not available for chat.
|
||||||
@ -23,12 +24,6 @@ pub enum PresenceState {
|
|||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for PresenceState {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::Online
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for &'_ PresenceState {
|
impl Default for &'_ PresenceState {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
&PresenceState::Online
|
&PresenceState::Online
|
||||||
|
@ -10,10 +10,11 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
|||||||
/// One of `==`, `<`, `>`, `>=` or `<=`.
|
/// One of `==`, `<`, `>`, `>=` or `<=`.
|
||||||
///
|
///
|
||||||
/// Used by `RoomMemberCountIs`. Defaults to `==`.
|
/// Used by `RoomMemberCountIs`. Defaults to `==`.
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
|
||||||
#[allow(clippy::exhaustive_enums)]
|
#[allow(clippy::exhaustive_enums)]
|
||||||
pub enum ComparisonOperator {
|
pub enum ComparisonOperator {
|
||||||
/// Equals
|
/// Equals
|
||||||
|
#[default]
|
||||||
Eq,
|
Eq,
|
||||||
|
|
||||||
/// Less than
|
/// Less than
|
||||||
@ -29,12 +30,6 @@ pub enum ComparisonOperator {
|
|||||||
Le,
|
Le,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ComparisonOperator {
|
|
||||||
fn default() -> Self {
|
|
||||||
ComparisonOperator::Eq
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A decimal integer optionally prefixed by one of `==`, `<`, `>`, `>=` or `<=`.
|
/// A decimal integer optionally prefixed by one of `==`, `<`, `>`, `>=` or `<=`.
|
||||||
///
|
///
|
||||||
/// A prefix of `<` matches rooms where the member count is strictly less than the given
|
/// A prefix of `<` matches rooms where the member count is strictly less than the given
|
||||||
|
@ -148,11 +148,12 @@ pub mod v1 {
|
|||||||
/// This type can hold an arbitrary string. To build this with a custom value, convert it from a
|
/// This type can hold an arbitrary string. To build this with a custom value, convert it from a
|
||||||
/// string with `::from() / .into()`. To check for values that are not available as a
|
/// string with `::from() / .into()`. To check for values that are not available as a
|
||||||
/// documented variant here, use its string representation, obtained through `.as_str()`.
|
/// documented variant here, use its string representation, obtained through `.as_str()`.
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, StringEnum)]
|
||||||
#[ruma_enum(rename_all = "snake_case")]
|
#[ruma_enum(rename_all = "snake_case")]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum NotificationPriority {
|
pub enum NotificationPriority {
|
||||||
/// A high priority notification
|
/// A high priority notification
|
||||||
|
#[default]
|
||||||
High,
|
High,
|
||||||
|
|
||||||
/// A low priority notification
|
/// A low priority notification
|
||||||
@ -162,12 +163,6 @@ pub mod v1 {
|
|||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for NotificationPriority {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self::High
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Type for passing information about notification counts.
|
/// Type for passing information about notification counts.
|
||||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user