Use cargo-derivefmt to sort derives alphabetically

Used https://github.com/dcchut/cargo-derivefmt

With command:

cargo install --locked \
--git https://github.com/dcchut/cargo-derivefmt \
--bin cargo-derivefmt \
--rev 2ff93de7fb418180458dd1ba27e5655607c23ab6

Since it's not on crates.io at the moment.

Sample diff:

  -#[derive(Debug, Deserialize, Clone, Serialize)]
  +#[derive(Clone, Debug, Deserialize, Serialize)]

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/322/head
Manos Pitsidianakis 2023-12-09 18:47:16 +02:00
parent f3e85738e7
commit f900dbea46
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
101 changed files with 334 additions and 334 deletions

View File

@ -88,7 +88,7 @@ macro_rules! is_variant {
};
}
#[derive(Debug, Clone, Default)]
#[derive(Clone, Debug, Default)]
pub enum MailboxStatus {
Available,
Failed(Error),
@ -103,7 +103,7 @@ impl MailboxStatus {
is_variant! { is_parsing, Parsing(_, _) }
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct MailboxEntry {
pub status: MailboxStatus,
pub name: String,
@ -168,7 +168,7 @@ impl MailboxEntry {
}
}
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub enum IsOnline {
#[default]
Uninit,
@ -461,7 +461,7 @@ impl Drop for Account {
}
}
#[derive(Serialize, Debug, Clone, Default)]
#[derive(Clone, Debug, Default, Serialize)]
pub struct MailboxNode {
pub hash: MailboxHash,
pub depth: usize,

View File

@ -115,7 +115,7 @@ pub mod manpages {
}
}
#[derive(Copy, Clone, Debug)]
#[derive(Clone, Copy, Debug)]
/// Choose manpage
pub enum ManPages {
/// meli(1)

View File

@ -111,7 +111,7 @@ pub fn quoted_argument(input: &[u8]) -> IResult<&[u8], &str> {
}
}
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct TokenStream {
tokens: &'static [TokenAdicity],
}
@ -225,7 +225,7 @@ impl TokenStream {
/// `Token` wrapper that defines how many times a token is expected to be
/// repeated
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub enum TokenAdicity {
ZeroOrOne(Token),
ZeroOrMore(Token),
@ -245,7 +245,7 @@ impl TokenAdicity {
}
/// A token encountered in the UI's command execution bar
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub enum Token {
Literal(&'static str),
Filepath,

View File

@ -21,7 +21,7 @@
use super::*;
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub enum CommandError {
Parsing {
inner: Cow<'static, str>,

View File

@ -31,7 +31,7 @@ use uuid::Uuid;
use super::*;
#[derive(Clone, Copy, Eq, Deserialize, Hash, Ord, PartialOrd, PartialEq, Serialize)]
#[derive(Clone, Copy, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
#[repr(transparent)]
pub struct ComponentId(Uuid);
@ -98,7 +98,7 @@ impl ExtendShortcutsMaps for ShortcutMaps {
}
}
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum PageMovement {
Up(usize),
Right(usize),
@ -110,14 +110,14 @@ pub enum PageMovement {
End,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct ScrollContext {
pub shown_lines: usize,
pub total_lines: usize,
pub has_more_lines: bool,
}
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum ScrollUpdate {
End(ComponentId),
Update {
@ -266,7 +266,7 @@ impl Default for ComponentAttr {
}
}
#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ComponentPath {
pub id: ComponentId,
pub tail: SmallVec<[ComponentId; 8]>,

View File

@ -113,7 +113,7 @@ macro_rules! mailbox_settings {
}};
}
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct MailUIConf {
#[serde(default)]
@ -136,7 +136,7 @@ pub struct MailUIConf {
pub pgp: PGPSettingsOverride,
}
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(default)]
pub struct FileMailboxConf {
#[serde(flatten)]
@ -158,7 +158,7 @@ impl FileMailboxConf {
}
use crate::conf::deserializers::extra_settings;
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct FileAccount {
pub root_mailbox: String,
pub format: String,
@ -204,7 +204,7 @@ impl FileAccount {
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct FileSettings {
pub accounts: IndexMap<String, FileAccount>,
@ -227,7 +227,7 @@ pub struct FileSettings {
pub log: LogSettings,
}
#[derive(Debug, Clone, Default, Serialize)]
#[derive(Clone, Debug, Default, Serialize)]
pub struct AccountConf {
pub account: AccountSettings,
pub conf: FileAccount,
@ -573,7 +573,7 @@ This is required so that you don't accidentally start meli and find out later th
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[derive(Clone, Debug, Default, Serialize)]
pub struct Settings {
pub accounts: IndexMap<String, AccountConf>,
pub pager: PagerSettings,
@ -646,7 +646,7 @@ impl Settings {
}
}
#[derive(Copy, Debug, Clone, Hash, PartialEq, Eq, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum IndexStyle {
Plain,
Threaded,
@ -786,7 +786,7 @@ impl Serialize for IndexStyle {
}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum SearchBackend {
None,
#[default]
@ -1001,7 +1001,7 @@ mod pp {
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct LogSettings {
#[serde(default)]

View File

@ -30,7 +30,7 @@ use super::{
};
/// Settings for writing and sending new e-mail
#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ComposingSettings {
/// A command to pipe new emails to
@ -176,7 +176,7 @@ pub mod strings {
named_unit_variant!(server_submission);
}
#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(untagged)]
pub enum SendMail {
#[cfg(feature = "smtp")]
@ -188,7 +188,7 @@ pub enum SendMail {
/// Shell command compose hooks (See
/// [`crate::mail::compose::hooks::Hook`])
#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ComposeHook {
#[serde(deserialize_with = "non_empty_string")]

View File

@ -55,7 +55,7 @@ use super::{default_vals::*, DotAddressable, IndexStyle};
/// const HAS_SIBLING_LEAF: &str = " ├─";
/// const NO_SIBLING_LEAF: &str = " ╰─";
/// ```
#[derive(Debug, Deserialize, Clone, Serialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ListingSettings {
/// Number of context lines when going to next page.

View File

@ -27,7 +27,7 @@ use super::{
};
/// Settings for the notifications function.
#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct NotificationsSettings {
/// Enable notifications.

View File

@ -26,7 +26,7 @@ use melib::{Error, Result, ToggleFlag};
use super::{default_vals::*, deserializers::*, DotAddressable};
/// Settings for the pager function.
#[derive(Debug, Deserialize, Clone, Serialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct PagerSettings {
/// Number of context lines when going to next page.

View File

@ -24,7 +24,7 @@ use melib::conf::ToggleFlag;
use super::default_vals::*;
/// Settings for digital signing and encryption
#[derive(Debug, Deserialize, Clone, Serialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct PGPSettings {
/// auto verify signed e-mail according to RFC3156

View File

@ -35,7 +35,7 @@ macro_rules! shortcut {
};
}
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct Shortcuts {
#[serde(default)]

View File

@ -29,7 +29,7 @@ use serde::{Deserialize, Deserializer};
use super::DotAddressable;
use crate::terminal::Color;
#[derive(Default, Debug, Deserialize, Clone, Serialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct TagsSettings {
#[serde(default, deserialize_with = "tag_color_de")]

View File

@ -26,7 +26,7 @@ use melib::{Error, Result, ToggleFlag};
use super::{deserializers::non_empty_opt_string, DotAddressable, Themes};
/// Settings for terminal display
#[derive(Debug, Deserialize, Clone, Serialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(default, deny_unknown_fields)]
pub struct TerminalSettings {
/// light, dark
@ -109,7 +109,7 @@ impl DotAddressable for TerminalSettings {
}
}
#[derive(Debug, Deserialize, Clone, Serialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(untagged)]
pub enum ProgressSpinnerSequence {
Integer(usize),

View File

@ -323,7 +323,7 @@ const DEFAULT_KEYS: &[&str] = &[
];
/// `ThemeAttributeInner` but with the links resolved.
#[derive(Debug, PartialEq, Eq, Clone, Default, Copy, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ThemeAttribute {
pub fg: Color,
@ -332,7 +332,7 @@ pub struct ThemeAttribute {
}
/// Holds {fore,back}ground color and terminal attribute values.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ThemeAttributeInner {
#[serde(default)]
@ -353,7 +353,7 @@ impl Default for ThemeAttributeInner {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub enum ColorField {
// Like self, i.e. either Fg or Bg
LikeSelf,
@ -376,7 +376,7 @@ impl ThemeLink for Attr {
type LinkType = ();
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
/// Holds either an actual value or refers to the key name of the attribute that
/// holds the value.
enum ThemeValue<T: ThemeLink> {
@ -501,14 +501,14 @@ impl<'de> Deserialize<'de> for ThemeValue<Color> {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct Themes {
pub light: Theme,
pub dark: Theme,
pub other_themes: IndexMap<String, Theme>,
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct Theme {
color_aliases: IndexMap<Cow<'static, str>, ThemeValue<Color>>,
attr_aliases: IndexMap<Cow<'static, str>, ThemeValue<Attr>>,
@ -533,7 +533,7 @@ mod regexp {
#[derive(Clone)]
pub struct RegexpWrapper(pub pcre2::bytes::Regex);
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub(super) struct TextFormatterSetting {
pub(super) regexp: RegexpWrapper,
pub(super) fg: Option<ThemeValue<Color>>,
@ -542,7 +542,7 @@ mod regexp {
pub(super) priority: u8,
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct TextFormatter<'r> {
pub regexp: &'r RegexpWrapper,
pub tag: FormatTag,
@ -784,7 +784,7 @@ impl<'de> Deserialize<'de> for Themes {
#[serde(flatten, default)]
other_themes: IndexMap<String, ThemeOptions>,
}
#[derive(Deserialize, Default)]
#[derive(Default, Deserialize)]
struct ThemeOptions {
#[serde(default)]
color_aliases: IndexMap<Cow<'static, str>, ThemeValue<Color>>,
@ -797,7 +797,7 @@ impl<'de> Deserialize<'de> for Themes {
keys: IndexMap<Cow<'static, str>, ThemeAttributeInnerOptions>,
}
#[cfg(feature = "regexp")]
#[derive(Deserialize, Default)]
#[derive(Default, Deserialize)]
struct RegexpOptions {
#[serde(default = "false_val")]
caseless: bool,
@ -816,7 +816,7 @@ impl<'de> Deserialize<'de> for Themes {
#[serde(flatten)]
rest: ThemeAttributeInnerOptions,
}
#[derive(Deserialize, Default)]
#[derive(Default, Deserialize)]
#[serde(deny_unknown_fields)]
struct ThemeAttributeInnerOptions {
#[serde(default)]
@ -1815,7 +1815,7 @@ impl Serialize for Themes {
/* Check Theme linked values for cycles */
fn is_cyclic(theme: &Theme) -> std::result::Result<(), String> {
#[derive(Hash, Copy, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
enum Course {
Fg,
Bg,

View File

@ -110,7 +110,7 @@ pub struct MeliTask {
timer: bool,
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
/// A spawned future's metadata for book-keeping.
pub struct JobMetadata {
pub id: JobId,

View File

@ -32,7 +32,7 @@ use crate::{
},
};
#[derive(Debug, Copy, Clone, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
enum Column {
_0 = 0,

View File

@ -47,7 +47,7 @@ use edit_attachments::*;
pub mod hooks;
#[derive(Debug, PartialEq, Eq)]
#[derive(Debug, Eq, PartialEq)]
enum Cursor {
Headers,
Body,

View File

@ -21,7 +21,7 @@
use super::*;
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum EditAttachmentCursor {
AttachmentNo(usize),
#[default]

View File

@ -247,7 +247,7 @@ impl Component for KeySelection {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct GpgComposeState {
pub sign_mail: ToggleFlag,
pub encrypt_mail: ToggleFlag,

View File

@ -245,14 +245,14 @@ pub use self::plain::*;
mod offline;
pub use self::offline::*;
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub enum Focus {
None,
Entry,
EntryFullscreen,
}
#[derive(Debug, Copy, PartialEq, Eq, Clone, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum Modifier {
#[default]
SymmetricDifference,
@ -469,7 +469,7 @@ column_str!(struct SubjectString(String));
column_str!(struct FlagString(String));
column_str!(struct TagString(String, SmallVec<[Option<Color>; 8]>));
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
struct MailboxMenuEntry {
depth: usize,
indentation: u32,
@ -953,19 +953,19 @@ impl ListingComponent {
}
}
#[derive(PartialEq, Eq, Debug)]
#[derive(Debug, Eq, PartialEq)]
enum ListingFocus {
Menu,
Mailbox,
}
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
struct CursorPos {
account: usize,
menu: MenuEntryCursor,
}
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
enum MenuEntryCursor {
Status,
Mailbox(usize),
@ -983,7 +983,7 @@ impl std::ops::Sub<MenuEntryCursor> for isize {
}
}
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
enum ShowMenuScrollbar {
Never,
True,
@ -2637,7 +2637,7 @@ impl Listing {
/// Print a single account in the menu area.
fn print_account(&mut self, mut area: Area, aidx: usize, context: &mut Context) -> usize {
let account_y = self.menu.area().height() - area.height();
#[derive(Copy, Debug, Clone)]
#[derive(Clone, Copy, Debug)]
struct Line {
collapsed: bool,
depth: usize,
@ -3158,7 +3158,7 @@ impl Listing {
}
}
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum ListingMessage {
FocusUpdate {
new_value: Focus,

View File

@ -24,7 +24,7 @@ use melib::{text_processing::Truncate, Envelope, Error, Mail, Result};
use super::{EnvelopeView, MailView, ViewSettings};
use crate::{jobs::JoinHandle, mailbox_settings, Component, Context, ShortcutMaps, UIEvent};
#[derive(Debug, Copy, Clone, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PendingReplyAction {
Reply,
ReplyToAuthor,

View File

@ -43,7 +43,7 @@ struct ThreadEntry {
mailview: Box<MailView>,
}
#[derive(Debug, Default, Copy, Clone)]
#[derive(Clone, Copy, Debug, Default)]
pub enum ThreadViewFocus {
#[default]
None,

View File

@ -29,7 +29,7 @@ use crate::{
ShortcutMap, ThemeAttribute, UIDialog,
};
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct ViewSettings {
pub pager_filter: Option<String>,
pub html_filter: Option<String>,
@ -67,13 +67,13 @@ impl Default for ViewSettings {
}
}
#[derive(Eq, PartialEq, Copy, Clone, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum LinkKind {
Url,
Email,
}
#[derive(Eq, PartialEq, Clone, Debug)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Link {
pub start: usize,
pub end: usize,
@ -98,7 +98,7 @@ impl From<&ForceCharset> for Option<Charset> {
}
}
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum Source {
Decoded,
Raw,

View File

@ -26,7 +26,7 @@ use melib::{backends::AccountHash, SortOrder};
use super::*;
use crate::{accounts::MailboxEntry, melib::text_processing::TextProcessing};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
enum MailboxAction {
Rename,
Move,
@ -41,7 +41,7 @@ enum ViewMode {
Action(UIDialog<MailboxAction>),
}
#[derive(Debug, Copy, Clone, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
enum Column {
_0 = 0,

View File

@ -176,7 +176,7 @@ mod dbus {
}
/// Passes notifications to a user defined shell command
#[derive(Default, Debug)]
#[derive(Debug, Default)]
pub struct NotificationCommand {
id: ComponentId,
}

View File

@ -110,7 +110,7 @@ impl InputHandler {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct MainLoopHandler {
pub sender: Sender<ThreadEvent>,
pub job_executor: Arc<JobExecutor>,

View File

@ -43,7 +43,7 @@ use crate::{state::Context, ThemeAttribute};
///
/// See `CellBuffer::scroll_up` and `CellBuffer::scroll_down` for an explanation
/// of how `xterm` scrolling works.
#[derive(Debug, Clone, PartialEq, Eq, Default)]
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct ScrollRegion {
pub top: usize,
pub bottom: usize,
@ -59,7 +59,7 @@ pub struct ScrollRegion {
/// The first index, `Cellbuffer[y]`, corresponds to a row, and thus the y-axis.
/// The second index, `Cellbuffer[y][x]`, corresponds to a column within a row
/// and thus the x-axis.
#[derive(Clone, PartialEq, Eq)]
#[derive(Clone, Eq, PartialEq)]
pub struct CellBuffer {
pub cols: usize,
pub rows: usize,
@ -806,7 +806,7 @@ impl std::fmt::Display for CellBuffer {
/// A single point on a terminal display.
///
/// A `Cell` contains a character and style.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct Cell {
ch: char,
@ -1777,7 +1777,7 @@ impl KMP for CellBuffer {
}
}
#[derive(Debug, Default, Copy, Hash, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub struct FormatTag {
pub fg: Option<Color>,
pub bg: Option<Color>,
@ -1817,7 +1817,7 @@ impl FormatTag {
}
}
#[derive(Debug, Copy, Hash, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum WidgetWidth {
Unset,
Hold(usize),

View File

@ -49,7 +49,7 @@ use termion::color::{AnsiValue, Rgb as TermionRgb};
/// // Basic colors are also 8-bit colors (but not vice-versa).
/// assert_eq!(red.as_byte(), fancy.as_byte())
/// ```
#[derive(Hash, Debug, Copy, Clone, PartialEq, Eq, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum Color {
Black,
Red,
@ -447,7 +447,7 @@ impl<'de> Deserialize<'de> for Color {
#[test]
fn test_color_de() {
#[derive(Debug, Deserialize, PartialEq, Eq)]
#[derive(Debug, Deserialize, Eq, PartialEq)]
struct V {
k: Color,
}

View File

@ -21,7 +21,7 @@
use smallvec::SmallVec;
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub enum State {
ExpectingControlChar,
G0, // Designate G0 Character Set

View File

@ -52,7 +52,7 @@ use crate::terminal::{
Area, Color, Screen, Virtual,
};
#[derive(Debug, Default, Clone, Copy)]
#[derive(Clone, Copy, Debug, Default)]
#[repr(u8)]
pub enum ScreenBuffer {
#[default]
@ -60,7 +60,7 @@ pub enum ScreenBuffer {
Alternate,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
enum CodepointBuf {
None,
TwoCodepoints(u8),
@ -184,7 +184,7 @@ impl Terminal {
/// translated as changes to the grid, eg changes in a cell's colors.
///
/// The main process copies the grid whenever the actual terminal is redrawn.
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct EmbeddedGrid {
cursor: (usize, usize),
/// `[top;bottom]`

View File

@ -34,7 +34,7 @@ use termion::{
use super::*;
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Key {
/// Backspace.
Backspace,
@ -80,7 +80,7 @@ pub enum Key {
}
/// A mouse related event.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
#[serde(untagged)]
pub enum MouseEvent {
/// A mouse button was pressed.
@ -109,7 +109,7 @@ impl From<TermionMouseEvent> for MouseEvent {
}
/// A mouse button.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
#[serde(untagged)]
pub enum MouseButton {
/// The left mouse button.
@ -208,7 +208,7 @@ impl PartialEq<Key> for &Key {
}
}
#[derive(PartialEq, Eq)]
#[derive(Eq, PartialEq)]
/// Keep track of whether we're accepting normal user input or a pasted string.
enum InputMode {
Normal,
@ -426,7 +426,7 @@ impl Serialize for Key {
#[test]
fn test_key_serde() {
#[derive(Debug, Deserialize, PartialEq, Eq)]
#[derive(Debug, Deserialize, Eq, PartialEq)]
struct V {
k: Key,
}

View File

@ -52,7 +52,7 @@ pub fn pos_dec(p: Pos, dec: (usize, usize)) -> Pos {
(p.0.saturating_sub(dec.0), p.1.saturating_sub(dec.1))
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum Alignment {
/// Stretch to fill all space if possible, center if no meaningful way to
/// stretch.

View File

@ -40,7 +40,7 @@ pub type StateStdout = termion::screen::AlternateScreen<
type DrawHorizontalSegmentFn = fn(&mut CellBuffer, &mut StateStdout, usize, usize, usize) -> ();
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)]
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(transparent)]
pub struct ScreenGeneration((u64, u64));
@ -478,7 +478,7 @@ impl Screen<Virtual> {
}
/// An `Area` consists of two points: the upper left and bottom right corners.
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
pub struct Area {
offset: Pos,
upper_left: Pos,

View File

@ -21,7 +21,7 @@
use melib::text_processing::TextProcessing;
#[derive(Debug, Clone, Default, PartialEq, Eq)]
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct UText {
content: String,
cursor_pos: usize,

View File

@ -105,7 +105,7 @@ pub enum ForkType {
NewDraft(File, std::process::Child),
}
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum NotificationType {
Info,
Error(melib::error::ErrorKind),
@ -191,7 +191,7 @@ impl From<RefreshEvent> for UIEvent {
}
}
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum UIMode {
Normal,
Insert,
@ -226,7 +226,7 @@ pub mod segment_tree {
use smallvec::SmallVec;
#[derive(Default, Debug, Clone)]
#[derive(Clone, Debug, Default)]
pub struct SegmentTree {
pub array: SmallVec<[u8; 1024]>,
tree: SmallVec<[u8; 1024]>,

View File

@ -51,7 +51,7 @@ use indexmap::IndexMap;
pub use self::tables::*;
use crate::{components::ExtendShortcutsMaps, jobs::JobId, melib::text_processing::TextProcessing};
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum SearchMovement {
Previous,
#[default]
@ -60,7 +60,7 @@ pub enum SearchMovement {
Last,
}
#[derive(Default, Debug, Clone)]
#[derive(Clone, Debug, Default)]
pub struct SearchPattern {
pattern: String,
positions: Vec<(usize, usize)>,

View File

@ -25,7 +25,7 @@ const OK: &str = "OK";
const CANCEL: &str = "Cancel";
const CANCEL_OFFSET: usize = "OK ".len();
#[derive(Debug, Copy, PartialEq, Eq, Clone)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
enum SelectorCursor {
Unfocused,
/// Cursor is at an entry

View File

@ -28,7 +28,7 @@ use crate::terminal::embedded::EmbeddedGrid;
/// `Pager` holds its own content in its own `CellBuffer` and when `draw` is
/// called, it draws the current view of the text. It is responsible for
/// scrolling etc.
#[derive(Default, Debug, Clone)]
#[derive(Clone, Debug, Default)]
pub struct Pager {
text: String,
cursor: (usize, usize),

View File

@ -28,7 +28,7 @@ use crate::{
terminal::{Screen, Virtual},
};
#[derive(Debug, Default, Copy, Clone)]
#[derive(Clone, Copy, Debug, Default)]
pub enum ColumnElasticity {
#[default]
Rigid,
@ -65,7 +65,7 @@ impl TableRowFormat {
}
*/
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub struct TableThemeConfig {
pub theme: TableTheme,
//pub row_formats: HashMap<usize, SmallVec<[(u8, TableRowFormat); 6]>>,
@ -83,7 +83,7 @@ impl TableThemeConfig {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub enum TableTheme {
Single(ThemeAttribute),
EvenOdd {
@ -98,7 +98,7 @@ impl Default for TableTheme {
}
}
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub struct TableCursorConfig {
pub handle: bool,
pub theme: TableTheme,
@ -121,7 +121,7 @@ impl TableCursorConfig {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct DataColumns<const N: usize> {
pub cursor_config: TableCursorConfig,
pub theme_config: TableThemeConfig,

View File

@ -24,7 +24,7 @@ use std::{borrow::Cow, collections::HashMap, time::Duration};
use super::*;
use crate::melib::text_processing::TextProcessing;
#[derive(Copy, Clone, Debug, PartialEq, Eq, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
enum FormFocus {
#[default]
Fields,
@ -194,7 +194,7 @@ impl std::fmt::Display for Field {
}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum FormButtonActions {
Accept,
Reset,
@ -662,7 +662,7 @@ where
}
}
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AutoCompleteEntry {
pub entry: String,
pub description: String,
@ -703,7 +703,7 @@ impl From<(String, String)> for AutoCompleteEntry {
}
}
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AutoComplete {
entries: Vec<AutoCompleteEntry>,
cursor: usize,
@ -872,7 +872,7 @@ impl AutoComplete {
}
}
#[derive(Default, Copy, Clone)]
#[derive(Clone, Copy, Default)]
pub struct ScrollBar {
pub show_arrows: bool,
}

View File

@ -32,7 +32,7 @@ use crate::utils::{
parsec::Parser,
};
#[derive(Hash, Debug, PartialEq, Eq, Clone, Copy, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
#[serde(from = "String")]
#[serde(into = "String")]
pub enum CardId {
@ -75,7 +75,7 @@ impl From<String> for CardId {
}
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct AddressBook {
display_name: String,
created: UnixTimestamp,
@ -83,7 +83,7 @@ pub struct AddressBook {
pub cards: HashMap<CardId, Card>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct Card {
id: CardId,
title: String,

View File

@ -76,7 +76,7 @@ impl<V: VCardVersion> VCard<V> {
}
}
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub struct ContentLine {
group: Option<String>,
params: Vec<String>,

View File

@ -246,7 +246,7 @@ impl Backends {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub enum BackendEvent {
Notice {
description: String,
@ -270,7 +270,7 @@ impl From<Error> for BackendEvent {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub enum RefreshEventKind {
Update(EnvelopeHash, Box<Envelope>),
/// Rename(old_hash, new_hash)
@ -290,7 +290,7 @@ pub enum RefreshEventKind {
MailboxUnsubscribe(MailboxHash),
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct RefreshEvent {
pub mailbox_hash: MailboxHash,
pub account_hash: AccountHash,
@ -320,7 +320,7 @@ impl Deref for BackendEventConsumer {
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub enum FlagOp {
Set(Flag),
SetTag(String),
@ -351,7 +351,7 @@ impl FlagOp {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct MailBackendCapabilities {
pub is_async: bool,
pub is_remote: bool,
@ -362,7 +362,7 @@ pub struct MailBackendCapabilities {
pub extra_submission_headers: &'static [HeaderName],
}
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub enum MailBackendExtensionStatus {
Unsupported { comment: Option<&'static str> },
Supported { comment: Option<&'static str> },
@ -524,7 +524,7 @@ impl BackendOp for ReadOnlyOp {
}
}
#[derive(Default, Debug, Copy, Hash, Eq, Clone, Serialize, Deserialize, PartialEq)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum SpecialUsageMailbox {
#[default]
Normal,
@ -606,7 +606,7 @@ impl Clone for Mailbox {
}
}
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct MailboxPermissions {
pub create_messages: bool,
pub remove_messages: bool,
@ -639,7 +639,7 @@ impl std::fmt::Display for MailboxPermissions {
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct EnvelopeHashBatch {
pub first: EnvelopeHash,
pub rest: SmallVec<[EnvelopeHash; 64]>,
@ -692,7 +692,7 @@ impl EnvelopeHashBatch {
}
}
#[derive(Default, Clone)]
#[derive(Clone, Default)]
pub struct LazyCountSet {
pub not_yet_seen: usize,
pub set: BTreeSet<EnvelopeHash>,

View File

@ -33,7 +33,7 @@ use crate::backends::{MailboxHash, TagHash};
pub type EnvelopeRef<'g> = RwRef<'g, EnvelopeHash, Envelope>;
pub type EnvelopeRefMut<'g> = RwRefMut<'g, EnvelopeHash, Envelope>;
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct Collection {
pub envelopes: Arc<RwLock<HashMap<EnvelopeHash, Envelope>>>,
pub message_id_index: Arc<RwLock<HashMap<Vec<u8>, EnvelopeHash>>>,

View File

@ -32,7 +32,7 @@ use crate::{
};
pub use crate::{SortField, SortOrder};
#[derive(Debug, Serialize, Default, Clone)]
#[derive(Clone, Debug, Default, Serialize)]
pub struct AccountSettings {
pub name: String,
pub root_mailbox: String,
@ -102,7 +102,7 @@ impl AccountSettings {
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(default)]
pub struct MailboxConf {
#[serde(alias = "rename")]
@ -187,7 +187,7 @@ pub mod strings {
named_unit_variant!(ask);
}
#[derive(Copy, Default, Debug, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum ToggleFlag {
#[default]
Unset,

View File

@ -223,7 +223,7 @@ impl Flag {
/// the raw bytes that describe the email in `bytes`. Its body as an
/// `melib::email::Attachment` can be parsed on demand
/// with the `melib::email::Mail::body` method.
#[derive(Debug, Clone, Default)]
#[derive(Clone, Debug, Default)]
pub struct Mail {
pub envelope: Envelope,
pub bytes: Vec<u8>,
@ -267,7 +267,7 @@ crate::declare_u64_hash!(EnvelopeHash);
///
///To access the email attachments, you need to parse them from the raw email
/// bytes into an `Attachment` object.
#[derive(Clone, Serialize, Deserialize)]
#[derive(Clone, Deserialize, Serialize)]
pub struct Envelope {
// ----- IMAP4rev1 -----
pub date: String,

View File

@ -29,14 +29,14 @@ use std::{
use super::*;
#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct GroupAddress {
pub raw: Vec<u8>,
pub display_name: StrBuilder,
pub mailbox_list: Vec<Address>,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
/**
* Container for an address.
*
@ -100,7 +100,7 @@ impl PartialEq for MailboxAddress {
/// assert_eq!(addr.get_display_name(), Some("Jörg Doe".to_string()));
/// assert_eq!(addr.get_email(), "joerg@example.com".to_string());
/// ```
#[derive(Clone, Serialize, Deserialize)]
#[derive(Clone, Deserialize, Serialize)]
pub enum Address {
Mailbox(MailboxAddress),
Group(GroupAddress),
@ -467,7 +467,7 @@ impl TryFrom<&str> for Address {
}
}
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
#[repr(transparent)]
pub struct UIAddress<'a>(&'a Address);
@ -495,7 +495,7 @@ impl std::fmt::Display for UIAddress<'_> {
}
}
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
#[repr(transparent)]
pub struct UINameAddress<'a>(&'a Address);
@ -521,7 +521,7 @@ impl std::fmt::Display for UINameAddress<'_> {
}
/// Helper struct to return slices from a struct field on demand.
#[derive(Clone, Debug, Serialize, Deserialize, Default, PartialEq, Eq, Copy, Hash)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct StrBuilder {
pub offset: usize,
pub length: usize,
@ -550,7 +550,7 @@ impl StrBuilder {
}
/// `MessageID` is accessed through the `StrBuild` trait.
#[derive(Clone, Serialize, Deserialize, Default)]
#[derive(Clone, Default, Deserialize, Serialize)]
pub struct MessageID(pub Vec<u8>, pub StrBuilder);
impl StrBuild for MessageID {
@ -617,7 +617,7 @@ impl std::fmt::Debug for MessageID {
}
}
#[derive(Clone, Serialize, Deserialize)]
#[derive(Clone, Deserialize, Serialize)]
pub struct References {
pub raw: Vec<u8>,
pub refs: Vec<MessageID>,

View File

@ -25,7 +25,7 @@ use crate::email::{
parser::BytesExt,
};
#[derive(Clone, Default, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Hash)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum Charset {
Ascii,
#[default]
@ -194,7 +194,7 @@ impl std::fmt::Display for Charset {
}
}
#[derive(Clone, Default, Debug, PartialEq, Eq, Serialize, Deserialize, Hash)]
#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum MultipartType {
Alternative,
Digest,
@ -242,7 +242,7 @@ impl From<&[u8]> for MultipartType {
}
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum ContentType {
Text {
kind: Text,
@ -438,7 +438,7 @@ impl ContentType {
}
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Hash)]
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum Text {
Plain,
Html,
@ -463,7 +463,7 @@ impl std::fmt::Display for Text {
}
}
#[derive(Clone, Default, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum ContentTransferEncoding {
#[default]
_8Bit,
@ -506,7 +506,7 @@ impl From<&[u8]> for ContentTransferEncoding {
}
}
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct ContentDisposition {
pub kind: ContentDispositionKind,
pub filename: Option<String>,
@ -517,7 +517,7 @@ pub struct ContentDisposition {
pub parameter: Vec<String>,
}
#[derive(Clone, Default, Debug, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum ContentDispositionKind {
#[default]
Inline,

View File

@ -59,7 +59,7 @@ impl<'att> From<Option<Charset>> for DecodeOptions<'att> {
}
}
#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
/// A struct analogous to [`Attachment`] which can have incomplete and partial
/// content before being turned into an [`Attachment`] with
/// [`AttachmentBuilder::build`].
@ -387,7 +387,7 @@ impl From<AttachmentBuilder> for Attachment {
}
/// Immutable attachment type.
#[derive(Clone, Serialize, Deserialize, PartialEq, Hash, Eq)]
#[derive(Clone, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Attachment {
pub content_type: ContentType,
pub content_transfer_encoding: ContentTransferEncoding,

View File

@ -44,7 +44,7 @@ pub mod random;
use super::parser;
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Draft {
pub headers: HeaderMap,
pub body: String,

View File

@ -82,7 +82,7 @@ impl<'a> Borrow<dyn HeaderKey + 'a> for HeaderName {
///
/// Except for the above, indexing will also panic if index is out of range or
/// header key is not present in the map.
#[derive(Debug, Default, PartialEq, Eq, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
pub struct HeaderMap(indexmap::IndexMap<HeaderName, String>);
impl std::ops::Index<usize> for HeaderMap {

View File

@ -50,7 +50,7 @@ bitflags! {
/// Case insensitive owned wrapper for a header name.
/// As of `RFC5322` it's guaranteed to be ASCII.
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct HeaderName {
pub(super) inner: Repr<Custom>,
}
@ -62,7 +62,7 @@ impl Custom {
}
}
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub(super) enum Repr<T> {
Standard(StandardHeader),
Custom(T),
@ -78,7 +78,7 @@ impl<T: std::fmt::Display> std::fmt::Display for Repr<T> {
}
// Used to hijack the Hash impl
#[derive(Debug, Clone, Eq, PartialEq)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub(super) struct Custom(pub(super) SmallVec<[u8; 32]>);
/// A possible error when converting a `HeaderName` from another type.
@ -225,7 +225,7 @@ impl<'de> Deserialize<'de> for HeaderName {
where
D: Deserializer<'de>,
{
#[derive(Serialize, Deserialize)]
#[derive(Deserialize, Serialize)]
#[serde(untagged)]
enum Helper {
S(String),

View File

@ -209,7 +209,7 @@ standards! {
}
/// Status of field at the moment of writing.
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum Status {
/// Deprecated,
Deprecated,

View File

@ -27,7 +27,7 @@ use smallvec::SmallVec;
use super::{parser, Envelope};
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ListAction<'a> {
Url(&'a [u8]),
Email(&'a [u8]),
@ -75,7 +75,7 @@ impl<'a> ListAction<'a> {
}
}
#[derive(Default, Debug)]
#[derive(Debug, Default)]
pub struct ListActions<'a> {
pub id: Option<&'a str>,
pub archive: Option<&'a str>,

View File

@ -32,7 +32,7 @@ use crate::{
utils::percent_encoding::{AsciiSet, CONTROLS},
};
#[derive(Debug, Clone, Eq, PartialEq)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Mailto {
pub address: Vec<Address>,
pub body: Option<String>,

View File

@ -140,7 +140,7 @@ pub fn verify_signature(a: &Attachment) -> Result<(Vec<u8>, &Attachment)> {
}
}
#[derive(Debug, Clone, Default)]
#[derive(Clone, Debug, Default)]
pub struct DecryptionMetadata {
pub recipients: Vec<Recipient>,
pub file_name: Option<String>,
@ -148,13 +148,13 @@ pub struct DecryptionMetadata {
pub is_mime: bool,
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct Recipient {
pub keyid: Option<String>,
pub status: Result<()>,
}
#[derive(Debug, Clone, Default)]
#[derive(Clone, Debug, Default)]
pub struct SignatureMetadata {
pub signatures: Vec<Recipient>,
pub file_name: Option<String>,

View File

@ -25,7 +25,7 @@ use std::{borrow::Cow, io, result, str, string, sync::Arc};
pub type Result<T> = result::Result<T, Error>;
#[derive(Debug, Copy, PartialEq, Eq, Clone)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum NetworkErrorKind {
/// Unspecified
None,
@ -316,7 +316,7 @@ impl From<isahc::http::StatusCode> for NetworkErrorKind {
}
}
#[derive(Debug, Copy, PartialEq, Eq, Clone)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[non_exhaustive]
pub enum ErrorKind {
None,
@ -389,7 +389,7 @@ impl ErrorKind {
is_variant! { is_value_error, ValueError }
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct Error {
pub summary: Cow<'static, str>,
pub details: Option<Cow<'static, str>>,

View File

@ -32,7 +32,7 @@ use libc::{off_t, time_t, FILE};
/* automatically generated by rust-bindgen */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align> {
storage: Storage,
align: [Align; 0],
@ -184,13 +184,13 @@ pub type gpg_err_code_from_syserror = extern "C" fn() -> gpg_err_code_t;
pub type gpg_error_check_version =
extern "C" fn(req_version: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct gpgme_context {
_unused: [u8; 0],
}
pub type gpgme_ctx_t = *mut gpgme_context;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct gpgme_data {
_unused: [u8; 0],
}
@ -307,7 +307,7 @@ pub type gpgme_pinentry_mode_t = u32;
pub type gpgme_export_mode_t = ::std::os::raw::c_uint;
pub type gpgme_sig_notation_flags_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_sig_notation {
pub next: *mut _gpgme_sig_notation,
pub name: *mut ::std::os::raw::c_char,
@ -450,7 +450,7 @@ impl _gpgme_sig_notation {
}
pub type gpgme_sig_notation_t = *mut _gpgme_sig_notation;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_engine_info {
pub next: *mut _gpgme_engine_info,
pub protocol: gpgme_protocol_t,
@ -535,7 +535,7 @@ fn bindgen_test_layout__gpgme_engine_info() {
}
pub type gpgme_engine_info_t = *mut _gpgme_engine_info;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_tofu_info {
pub next: *mut _gpgme_tofu_info,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
@ -700,7 +700,7 @@ impl _gpgme_tofu_info {
}
pub type gpgme_tofu_info_t = *mut _gpgme_tofu_info;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_subkey {
pub next: *mut _gpgme_subkey,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
@ -1058,7 +1058,7 @@ impl _gpgme_subkey {
}
pub type gpgme_subkey_t = *mut _gpgme_subkey;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_key_sig {
pub next: *mut _gpgme_key_sig,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
@ -1332,7 +1332,7 @@ impl _gpgme_key_sig {
}
pub type gpgme_key_sig_t = *mut _gpgme_key_sig;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_user_id {
pub next: *mut _gpgme_user_id,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
@ -1546,7 +1546,7 @@ impl _gpgme_user_id {
}
pub type gpgme_user_id_t = *mut _gpgme_user_id;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_key {
pub _refs: ::std::os::raw::c_uint,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
@ -1910,7 +1910,7 @@ impl _gpgme_key {
}
pub type gpgme_key_t = *mut _gpgme_key;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_invalid_key {
pub next: *mut _gpgme_invalid_key,
pub fpr: *mut ::std::os::raw::c_char,
@ -2107,7 +2107,7 @@ pub const gpgme_event_io_t_GPGME_EVENT_NEXT_KEY: gpgme_event_io_t = 2;
pub const gpgme_event_io_t_GPGME_EVENT_NEXT_TRUSTITEM: gpgme_event_io_t = 3;
pub type gpgme_event_io_t = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct gpgme_io_event_done_data {
pub err: gpgme_error_t,
pub op_err: gpgme_error_t,
@ -2155,7 +2155,7 @@ pub type gpgme_event_io_cb_t = ::std::option::Option<
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct gpgme_io_cbs {
pub add: gpgme_register_io_cb_t,
pub add_priv: *mut ::std::os::raw::c_void,
@ -2282,7 +2282,7 @@ pub type gpgme_data_seek_cb_t = ::std::option::Option<
pub type gpgme_data_release_cb_t =
::std::option::Option<unsafe extern "C" fn(handle: *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct gpgme_data_cbs {
pub read: gpgme_data_read_cb_t,
pub write: gpgme_data_write_cb_t,
@ -2415,7 +2415,7 @@ pub type gpgme_key_from_uid =
pub type gpgme_key_ref = unsafe extern "C" fn(key: gpgme_key_t);
pub type gpgme_key_unref = unsafe extern "C" fn(key: gpgme_key_t);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_encrypt_result {
pub invalid_recipients: gpgme_invalid_key_t,
}
@ -2519,7 +2519,7 @@ pub type gpgme_op_encrypt_sign_ext = extern "C" fn(
cipher: gpgme_data_t,
) -> gpgme_error_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_recipient {
pub next: *mut _gpgme_recipient,
pub keyid: *mut ::std::os::raw::c_char,
@ -2593,7 +2593,7 @@ fn bindgen_test_layout__gpgme_recipient() {
}
pub type gpgme_recipient_t = *mut _gpgme_recipient;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_decrypt_result {
pub unsupported_algorithm: *mut ::std::os::raw::c_char,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
@ -2795,7 +2795,7 @@ pub type gpgme_op_decrypt_ext = extern "C" fn(
plain: gpgme_data_t,
) -> gpgme_error_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_new_signature {
pub next: *mut _gpgme_new_signature,
pub type_: gpgme_sig_mode_t,
@ -2917,7 +2917,7 @@ fn bindgen_test_layout__gpgme_new_signature() {
}
pub type gpgme_new_signature_t = *mut _gpgme_new_signature;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_sign_result {
pub invalid_signers: gpgme_invalid_key_t,
pub signatures: gpgme_new_signature_t,
@ -2988,7 +2988,7 @@ pub const gpgme_sigsum_t_GPGME_SIGSUM_SYS_ERROR: gpgme_sigsum_t = 2048;
pub const gpgme_sigsum_t_GPGME_SIGSUM_TOFU_CONFLICT: gpgme_sigsum_t = 4096;
pub type gpgme_sigsum_t = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_signature {
pub next: *mut _gpgme_signature,
pub summary: gpgme_sigsum_t,
@ -3242,7 +3242,7 @@ impl _gpgme_signature {
}
pub type gpgme_signature_t = *mut _gpgme_signature;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_verify_result {
pub signatures: gpgme_signature_t,
pub file_name: *mut ::std::os::raw::c_char,
@ -3343,7 +3343,7 @@ pub type gpgme_op_verify = extern "C" fn(
plaintext: gpgme_data_t,
) -> gpgme_error_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_import_status {
pub next: *mut _gpgme_import_status,
pub fpr: *mut ::std::os::raw::c_char,
@ -3406,7 +3406,7 @@ fn bindgen_test_layout__gpgme_import_status() {
}
pub type gpgme_import_status_t = *mut _gpgme_import_status;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_import_result {
pub considered: ::std::os::raw::c_int,
pub no_user_id: ::std::os::raw::c_int,
@ -3677,7 +3677,7 @@ pub type gpgme_op_export_keys = extern "C" fn(
keydata: gpgme_data_t,
) -> gpgme_error_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_genkey_result {
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
pub fpr: *mut ::std::os::raw::c_char,
@ -3943,7 +3943,7 @@ pub type gpgme_op_tofu_policy =
extern "C" fn(ctx: gpgme_ctx_t, key: gpgme_key_t, policy: gpgme_tofu_policy_t) -> gpgme_error_t;
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_keylist_result {
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
}
@ -4033,7 +4033,7 @@ pub type gpgme_op_passwd = extern "C" fn(
flags: ::std::os::raw::c_uint,
) -> gpgme_error_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_trust_item {
pub _refs: ::std::os::raw::c_uint,
pub keyid: *mut ::std::os::raw::c_char,
@ -4243,7 +4243,7 @@ pub type gpgme_op_assuan_transact_ext = extern "C" fn(
op_err: *mut gpgme_error_t,
) -> gpgme_error_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_vfs_mount_result {
pub mount_dir: *mut ::std::os::raw::c_char,
}
@ -4307,14 +4307,14 @@ pub const gpgme_conf_type_t_GPGME_CONF_SEC_KEY: gpgme_conf_type_t = 36;
pub const gpgme_conf_type_t_GPGME_CONF_ALIAS_LIST: gpgme_conf_type_t = 37;
pub type gpgme_conf_type_t = u32;
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy)]
pub struct gpgme_conf_arg {
pub next: *mut gpgme_conf_arg,
pub no_arg: ::std::os::raw::c_uint,
pub value: gpgme_conf_arg__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy)]
pub union gpgme_conf_arg__bindgen_ty_1 {
pub count: ::std::os::raw::c_uint,
pub uint32: ::std::os::raw::c_uint,
@ -4430,7 +4430,7 @@ fn bindgen_test_layout_gpgme_conf_arg() {
}
pub type gpgme_conf_arg_t = *mut gpgme_conf_arg;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct gpgme_conf_opt {
pub next: *mut gpgme_conf_opt,
pub name: *mut ::std::os::raw::c_char,
@ -4629,7 +4629,7 @@ fn bindgen_test_layout_gpgme_conf_opt() {
}
pub type gpgme_conf_opt_t = *mut gpgme_conf_opt;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct gpgme_conf_comp {
pub next: *mut gpgme_conf_comp,
pub _last_opt_p: *mut gpgme_conf_opt_t,
@ -4735,7 +4735,7 @@ pub type gpgme_op_conf_dir = extern "C" fn(
result: *mut *mut ::std::os::raw::c_char,
) -> gpgme_error_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_query_swdb_result {
pub next: *mut _gpgme_op_query_swdb_result,
pub name: *mut ::std::os::raw::c_char,
@ -5283,7 +5283,7 @@ pub type gpgme_trust_item_get_int_attr = extern "C" fn(
idx: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _gpgme_op_assuan_result {
pub err: gpgme_error_t,
}
@ -5359,7 +5359,7 @@ pub type GpgmeTrustItem = gpgme_trust_item_t;
pub use self::gpgme_status_code_t as GpgmeStatusCode;
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct __va_list_tag {
pub gp_offset: ::std::os::raw::c_uint,
pub fp_offset: ::std::os::raw::c_uint,

View File

@ -76,7 +76,7 @@ pub mod bindings;
use bindings::*;
pub mod io;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum GpgmeFlag {
///"auto-key-retrieve"
AutoKeyRetrieve,

View File

@ -29,7 +29,7 @@ use crate::{
error::*,
};
#[derive(Debug, PartialEq, Hash, Eq, Ord, PartialOrd, Copy, Clone)]
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ModSequence(pub std::num::NonZeroU64);
impl TryFrom<i64> for ModSequence {

View File

@ -77,7 +77,7 @@ macro_rules! imap_trace {
use super::{protocol_parser, Capabilities, ImapServerConf, UIDStore};
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum SyncPolicy {
None,
/// RFC4549 `Synch Ops for Disconnected IMAP4 Clients` <https://tools.ietf.org/html/rfc4549>
@ -88,13 +88,13 @@ pub enum SyncPolicy {
CondstoreQresync,
}
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum ImapProtocol {
IMAP { extension_use: ImapExtensionUse },
ManageSieve,
}
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub struct ImapExtensionUse {
pub condstore: bool,
pub idle: bool,
@ -124,7 +124,7 @@ pub struct ImapStream {
pub timeout: Option<Duration>,
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum MailboxSelection {
None,
Select(MailboxHash),

View File

@ -29,7 +29,7 @@ use crate::{
error::*,
};
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub struct ImapMailbox {
pub hash: MailboxHash,
pub imap_path: String,

View File

@ -38,7 +38,7 @@ pub struct ManageSieveConnection {
pub inner: ImapConnection,
}
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ManageSieveResponse<'a> {
Ok {
code: Option<&'a [u8]>,

View File

@ -100,7 +100,7 @@ pub struct EnvelopeCache {
flags: Option<Flag>,
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct ImapServerConf {
pub server_hostname: String,
pub server_username: String,
@ -1589,7 +1589,7 @@ impl ImapType {
}
}
#[derive(Debug, PartialEq, Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
enum FetchStage {
InitialFresh,
InitialCache,

View File

@ -27,7 +27,7 @@ use super::*;
use crate::{backends::*, error::Error};
/// `BackendOp` implementor for Imap
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct ImapOp {
uid: UID,
mailbox_hash: MailboxHash,

View File

@ -484,7 +484,7 @@ pub fn list_mailbox_result(input: &[u8]) -> IResult<&[u8], ImapMailbox> {
))
}
#[derive(Debug, Clone, Eq, PartialEq)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct FetchResponse<'a> {
pub uid: Option<UID>,
pub message_sequence_number: MessageSequenceNumber,
@ -931,7 +931,7 @@ pub fn search_results_raw<'a>(input: &'a [u8]) -> IResult<&'a [u8], &'a [u8]> {
))(input)
}
#[derive(Debug, Default, Eq, PartialEq, Clone)]
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct SelectResponse {
pub exists: ImapNum,
pub recent: ImapNum,
@ -1382,7 +1382,7 @@ fn eat_whitespace(mut input: &[u8]) -> IResult<&[u8], ()> {
Ok((input, ()))
}
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub struct StatusResponse {
pub mailbox: Option<MailboxHash>,
pub messages: Option<ImapNum>,

View File

@ -24,7 +24,7 @@ use std::sync::{Arc, Mutex, RwLock};
use super::*;
use crate::backends::{LazyCountSet, MailboxPermissions, SpecialUsageMailbox};
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct JmapMailbox {
pub name: String,
pub path: String,

View File

@ -115,7 +115,7 @@ pub struct EnvelopeCache {
// flags: Option<Flag>,
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct JmapServerConf {
pub server_url: String,
pub server_username: String,

View File

@ -137,7 +137,7 @@ impl Id<EmailObject> {
// The date the Email was received by the message store. This is the
// "internal date" in IMAP [RFC3501]./
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailObject {
#[serde(default)]
@ -211,7 +211,7 @@ impl EmailObject {
_impl!(get keywords, keywords: IndexMap<String, bool>);
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Header {
pub name: String,
@ -228,7 +228,7 @@ where
Ok(v.into_iter().map(|t| (t.name, t.value)).collect())
}
#[derive(Deserialize, Serialize, Debug, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailAddress {
pub email: String,
@ -332,7 +332,7 @@ impl std::convert::From<EmailObject> for crate::Envelope {
}
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct HtmlBody {
pub blob_id: Id<BlobObject>,
@ -359,7 +359,7 @@ pub struct HtmlBody {
pub sub_parts: Vec<Value>,
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct TextBody {
pub blob_id: Id<BlobObject>,
@ -390,7 +390,7 @@ impl Object for EmailObject {
const NAME: &'static str = "Email";
}
#[derive(Serialize, Debug)]
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailQuery {
#[serde(flatten)]
@ -419,7 +419,7 @@ impl EmailQuery {
_impl!(collapse_threads: bool);
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailGet {
#[serde(flatten)]
@ -461,7 +461,7 @@ impl EmailGet {
_impl!(max_body_value_bytes: u64);
}
#[derive(Serialize, Deserialize, Default, Debug)]
#[derive(Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailFilterCondition {
#[serde(skip_serializing_if = "Option::is_none")]
@ -546,7 +546,7 @@ impl From<EmailFilterCondition> for FilterCondition<EmailFilterCondition, EmailO
}
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub enum MessageProperty {
ThreadId,
@ -790,7 +790,7 @@ fn test_jmap_query() {
assert_eq!(*request_no.lock().unwrap(), 1);
}
#[derive(Serialize, Debug)]
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailSet {
#[serde(flatten)]
@ -807,7 +807,7 @@ impl EmailSet {
}
}
#[derive(Serialize, Debug)]
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailChanges {
#[serde(flatten)]
@ -824,7 +824,7 @@ impl EmailChanges {
}
}
#[derive(Serialize, Debug)]
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailQueryChanges {
#[serde(flatten)]
@ -843,7 +843,7 @@ impl EmailQueryChanges {
}
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
pub struct EmailQueryChangesResponse {
///o The "collapseThreads" argument that was used with "Email/query".
#[serde(default = "bool_false")]

View File

@ -33,7 +33,7 @@ use super::*;
/// - `account_id`: `Id`
///
/// The id of the account to use.
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailImport {
/// accountId: `Id`
@ -52,7 +52,7 @@ pub struct EmailImport {
pub emails: IndexMap<Id<EmailObject>, EmailImportObject>,
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailImportObject {
/// o blobId: `Id`
@ -123,7 +123,7 @@ impl Default for EmailImportObject {
}
}
#[derive(Deserialize, Serialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
#[serde(tag = "type")]
pub enum EmailImportError {
@ -164,7 +164,7 @@ pub enum EmailImportError {
StateMismatch,
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailImportResponse {
/// o accountId: `Id`
@ -205,7 +205,7 @@ impl std::convert::TryFrom<&RawValue> for EmailImportResponse {
}
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailImportResult {
pub id: Id<EmailObject>,

View File

@ -25,7 +25,7 @@ use super::*;
///
/// An *Identity* object stores information about an email address or domain the
/// user may send from.
#[derive(Deserialize, Serialize, Debug, Clone, Default)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct IdentityObject {
/// id: `Id` (immutable; server-set)
@ -107,7 +107,7 @@ impl Method<IdentityObject> for IdentityChanges {
/// o "forbiddenFrom": The user is not allowed to send from the address
/// given as the "email" property of the Identity.
/// ```
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase", transparent)]
pub struct IdentitySet(pub Set<IdentityObject>);

View File

@ -27,7 +27,7 @@ impl Id<MailboxObject> {
}
}
#[derive(Deserialize, Serialize, Debug, Default)]
#[derive(Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct MailboxObject {
pub id: Id<MailboxObject>,
@ -47,7 +47,7 @@ impl Object for MailboxObject {
const NAME: &'static str = "Mailbox";
}
#[derive(Deserialize, Serialize, Debug, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct JmapRights {
pub may_add_items: bool,
@ -77,7 +77,7 @@ impl Default for JmapRights {
}
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct MailboxGet {
#[serde(flatten)]
@ -108,7 +108,7 @@ impl Method<MailboxObject> for MailboxGet {
///
/// - `mailboxHasEmail`: The Mailbox has at least one Email assigned to it, and
/// the `onDestroyRemoveEmails` argument was false.
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct MailboxSet {
#[serde(flatten)]

View File

@ -43,7 +43,7 @@ use super::*;
/// setting this property to `canceled`; if the update succeeds, the
/// submission was successfully canceled, and the message has not been
/// delivered to any of the original recipients.
#[derive(Deserialize, Serialize, Default, Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub enum UndoStatus {
/// It may be possible to cancel this submission.
@ -63,7 +63,7 @@ pub enum UndoStatus {
/// it SHOULD update the EmailSubmission object each time the status
/// of any of the recipients changes, even if some recipients are
/// still being retried.
#[derive(Deserialize, Serialize, Debug, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct DeliveryStatusObject {
/// The SMTP reply string returned for this recipient when the
@ -125,7 +125,7 @@ pub struct DeliveryStatusObject {
/// this recipient with Disposition-Type (as per `[RFC8098]`,
/// Section 3.2.6.2) equal to `displayed`, this property SHOULD be
/// set to `yes`.
#[derive(Deserialize, Serialize, Default, Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub enum Displayed {
/// The recipient's system claims the message content has been displayed to
@ -153,7 +153,7 @@ pub enum Displayed {
///
/// The server MAY also set this property based on other feedback
/// channels.
#[derive(Deserialize, Serialize, Default, Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub enum Delivered {
/// The message is in a local mail queue and the status will change once it
@ -177,7 +177,7 @@ pub enum Delivered {
///
/// An *EmailSubmission* object represents the submission of an Email for
/// delivery to one or more recipients. It has the following properties:
#[derive(Deserialize, Debug, Clone)]
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailSubmissionObject {
/// accountId: `Id`
@ -284,7 +284,7 @@ impl Serialize for EmailSubmissionObject {
}
}
#[derive(Serialize, Clone, Debug)]
#[derive(Clone, Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailSubmissionSet {
#[serde(flatten)]
@ -343,7 +343,7 @@ impl EmailSubmissionSet {
}
/// Information for use when sending via SMTP.
#[derive(Deserialize, Serialize, Debug, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EnvelopeObject {
/// The email address to use as the return address in the SMTP
@ -367,7 +367,7 @@ impl Object for EnvelopeObject {
const NAME: &'static str = "Envelope";
}
#[derive(Deserialize, Serialize, Debug, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Address {
/// The email address being represented by the object. This is a

View File

@ -23,7 +23,7 @@ use std::marker::PhantomData;
use super::*;
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreadObject {
#[serde(default)]
@ -40,7 +40,7 @@ impl ThreadObject {
_impl!(get email_ids, email_ids: Vec<Id<EmailObject>>);
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreadGet {
#[serde(flatten)]
@ -63,7 +63,7 @@ impl ThreadGet {
}
}
#[derive(Serialize, Debug)]
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreadChanges {
#[serde(flatten)]

View File

@ -24,7 +24,7 @@ use std::sync::Arc;
use super::*;
/// `BackendOp` implementor for Imap
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct JmapOp {
hash: EnvelopeHash,
connection: Arc<FutureMutex<JmapConnection>>,

View File

@ -226,7 +226,7 @@ pub async fn get_message(conn: &JmapConnection, ids: &[String]) -> Result<Vec<En
}
*/
#[derive(Copy, Clone)]
#[derive(Clone, Copy)]
pub enum EmailFetchState {
Start { batch_size: u64 },
Ongoing { position: u64, batch_size: u64 },

View File

@ -154,7 +154,7 @@ impl<OBJ> Id<OBJ> {
}
}
#[derive(Deserialize, Serialize, Debug)]
#[derive(Debug, Deserialize, Serialize)]
#[serde(transparent)]
pub struct State<OBJ> {
pub inner: String,
@ -228,7 +228,7 @@ impl<OBJ> State<OBJ> {
}
}
#[derive(Deserialize, Serialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Account {
pub name: String,
@ -243,14 +243,14 @@ impl Object for Account {
const NAME: &'static str = stringify!(Account);
}
#[derive(Copy, Clone, Debug)]
#[derive(Clone, Copy, Debug)]
pub struct BlobObject;
impl Object for BlobObject {
const NAME: &'static str = "Blob";
}
#[derive(Clone, Copy, Deserialize, Serialize, Debug)]
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct BlobGet;
@ -267,7 +267,7 @@ impl Method<BlobObject> for BlobGet {
/// - `account_id`: `Id`
///
/// The id of the account to use.
#[derive(Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Get<OBJ>
where
@ -389,7 +389,7 @@ impl<OBJ: Object + Serialize + std::fmt::Debug> Serialize for Get<OBJ> {
}
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct MethodResponse<'a> {
#[serde(borrow)]
@ -400,7 +400,7 @@ pub struct MethodResponse<'a> {
pub session_state: State<Session>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GetResponse<OBJ: Object> {
pub account_id: Id<Account>,
@ -427,7 +427,7 @@ impl<OBJ: Object> GetResponse<OBJ> {
_impl!(get_mut not_found_mut, not_found: Vec<Id<OBJ>>);
}
#[derive(Deserialize, Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
enum JmapError {
RequestTooLarge,
@ -435,7 +435,7 @@ enum JmapError {
InvalidResultReference,
}
#[derive(Serialize, Clone, Debug)]
#[derive(Clone, Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Query<F: FilterTrait<OBJ>, OBJ>
where
@ -508,7 +508,7 @@ pub fn bool_true() -> bool {
true
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct QueryResponse<OBJ: Object> {
pub account_id: Id<Account>,
@ -578,7 +578,7 @@ impl<M: Method<OBJ>, OBJ: Object> From<&'static str> for ResultField<M, OBJ> {
/// to return. If supplied by the client, the value MUST be a
/// positive integer greater than 0. If a value outside of this range
/// is given, the server MUST re
#[derive(Deserialize, Serialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
/* ch-ch-ch-ch-ch-Changes */
pub struct Changes<OBJ>
@ -640,7 +640,7 @@ where
}
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ChangesResponse<OBJ: Object> {
pub account_id: Id<Account>,
@ -682,7 +682,7 @@ impl<OBJ: Object> ChangesResponse<OBJ> {
/// and dependencies that may exist if doing multiple operations at once
/// (for example, to ensure there is always a minimum number of a certain
/// record type).
#[derive(Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Set<OBJ>
where
@ -834,7 +834,7 @@ impl<OBJ: Object + Serialize + std::fmt::Debug> Serialize for Set<OBJ> {
}
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SetResponse<OBJ: Object> {
/// o accountId: `Id`
@ -905,7 +905,7 @@ impl<OBJ: Object + DeserializeOwned> std::convert::TryFrom<&RawValue> for SetRes
}
}
#[derive(Deserialize, Serialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
#[serde(tag = "type", content = "description")]
pub enum SetError {
@ -1058,7 +1058,7 @@ pub fn upload_request_format(upload_url: &str, account_id: &Id<Account>) -> Stri
ret
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct UploadResponse {
/// o accountId: `Id`
@ -1091,7 +1091,7 @@ pub struct UploadResponse {
/// The `Foo/queryChanges` method allows a client to efficiently update
/// the state of a cached query to match the new state on the server. It
/// takes the following arguments:
#[derive(Serialize, Clone, Debug)]
#[derive(Clone, Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct QueryChanges<F: FilterTrait<OBJ>, OBJ>
where
@ -1160,7 +1160,7 @@ where
_impl!(calculate_total: bool);
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct QueryChangesResponse<OBJ: Object> {
/// The id of the account used for the call.
@ -1241,7 +1241,7 @@ pub struct QueryChangesResponse<OBJ: Object> {
pub added: Vec<AddedItem<OBJ>>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct AddedItem<OBJ: Object> {
pub id: Id<OBJ>,

View File

@ -26,7 +26,7 @@ use crate::jmap::{
rfc8620::{Object, ResultField},
};
#[derive(Deserialize, Serialize, Clone, PartialEq, Eq, Hash, Debug)]
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
#[serde(rename_all = "camelCase", untagged)]
pub enum Argument<T: Clone + PartialEq + Eq + Hash> {
Value(T),

View File

@ -21,7 +21,7 @@
use super::*;
#[derive(Serialize, Clone, Debug)]
#[derive(Clone, Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Comparator<OBJ: Object> {
property: String,

View File

@ -22,7 +22,7 @@
use super::*;
pub trait FilterTrait<T>: Default {}
#[derive(Serialize, Debug)]
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
#[serde(untagged)]
pub enum Filter<F: FilterTrait<OBJ>, OBJ: Object> {
@ -36,7 +36,7 @@ pub enum Filter<F: FilterTrait<OBJ>, OBJ: Object> {
impl<F: FilterTrait<OBJ>, OBJ: Object> FilterTrait<OBJ> for Filter<F, OBJ> {}
impl<F: FilterTrait<OBJ>, OBJ: Object> FilterTrait<OBJ> for FilterCondition<F, OBJ> {}
#[derive(Serialize, Debug)]
#[derive(Debug, Serialize)]
pub struct FilterCondition<F: FilterTrait<OBJ>, OBJ: Object> {
#[serde(flatten)]
pub cond: F,
@ -44,7 +44,7 @@ pub struct FilterCondition<F: FilterTrait<OBJ>, OBJ: Object> {
pub _ph: PhantomData<fn() -> OBJ>,
}
#[derive(Serialize, Debug, Eq, PartialEq)]
#[derive(Debug, Eq, PartialEq, Serialize)]
#[serde(rename_all = "UPPERCASE")]
pub enum FilterOperator {
And,

View File

@ -29,7 +29,7 @@ use crate::jmap::{
IdentityObject,
};
#[derive(Deserialize, Serialize, Debug, Clone, Default)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Session {
pub capabilities: IndexMap<String, CapabilitiesObject>,
@ -52,7 +52,7 @@ impl Object for Session {
const NAME: &'static str = stringify!(Session);
}
#[derive(Deserialize, Serialize, Clone, Default, Debug)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CapabilitiesObject {
#[serde(default)]

View File

@ -192,7 +192,7 @@ pub extern crate smallvec;
pub extern crate smol;
pub extern crate uuid;
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
#[repr(transparent)]
pub struct BytesDisplay(pub usize);

View File

@ -114,7 +114,7 @@ impl BackendOp for MaildirOp {
}
}
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub struct MaildirMailbox {
hash: MailboxHash,
name: String,

View File

@ -328,7 +328,7 @@ impl BackendOp for MboxOp {
}
}
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum MboxMetadata {
/// Dovecot uses C-Client (ie. UW-IMAP, Pine) compatible headers in mbox
/// messages to store me
@ -347,7 +347,7 @@ pub enum MboxMetadata {
/// Choose between "mboxo", "mboxrd", "mboxcl", "mboxcl2". For new mailboxes,
/// prefer "mboxcl2" which does not alter the mail body.
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum MboxFormat {
MboxO,
MboxRd,

View File

@ -35,7 +35,7 @@ pub use smol::Async as AsyncWrapper;
use super::{Capabilities, NntpServerConf, UIDStore};
#[derive(Debug, Default, Clone, Copy)]
#[derive(Clone, Copy, Debug, Default)]
pub struct NntpExtensionUse {
pub deflate: bool,
}
@ -48,7 +48,7 @@ pub struct NntpStream {
pub supports_submission: bool,
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum MailboxSelection {
None,
Select(MailboxHash),

View File

@ -29,7 +29,7 @@ use crate::{
UnixTimestamp,
};
#[derive(Debug, Default, Clone)]
#[derive(Clone, Debug, Default)]
pub struct NntpMailbox {
pub(super) hash: MailboxHash,
pub(super) nntp_path: String,

View File

@ -103,7 +103,7 @@ pub static SUPPORTED_CAPABILITIES: &[&str] = &[
"AUTHINFO USER",
];
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct NntpServerConf {
pub server_hostname: String,
pub server_username: String,

View File

@ -25,7 +25,7 @@ use super::*;
use crate::{backends::*, error::Error};
/// `BackendOp` implementor for Nntp
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct NntpOp {
uid: usize,
mailbox_hash: MailboxHash,

View File

@ -80,67 +80,67 @@ pub use self::_notmuch_status as notmuch_status_t;
pub type notmuch_status_to_string =
unsafe extern "C" fn(status: notmuch_status_t) -> *const ::std::os::raw::c_char;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_database {
_unused: [u8; 0],
}
pub type notmuch_database_t = _notmuch_database;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_query {
_unused: [u8; 0],
}
pub type notmuch_query_t = _notmuch_query;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_threads {
_unused: [u8; 0],
}
pub type notmuch_threads_t = _notmuch_threads;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_thread {
_unused: [u8; 0],
}
pub type notmuch_thread_t = _notmuch_thread;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_messages {
_unused: [u8; 0],
}
pub type notmuch_messages_t = _notmuch_messages;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_message {
_unused: [u8; 0],
}
pub type notmuch_message_t = _notmuch_message;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_tags {
_unused: [u8; 0],
}
pub type notmuch_tags_t = _notmuch_tags;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_directory {
_unused: [u8; 0],
}
pub type notmuch_directory_t = _notmuch_directory;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_filenames {
_unused: [u8; 0],
}
pub type notmuch_filenames_t = _notmuch_filenames;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_config_list {
_unused: [u8; 0],
}
pub type notmuch_config_list_t = _notmuch_config_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_indexopts {
_unused: [u8; 0],
}
@ -1636,7 +1636,7 @@ pub type notmuch_message_remove_all_properties_with_prefix =
) -> notmuch_status_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct _notmuch_string_map_iterator {
_unused: [u8; 0],
}

View File

@ -251,7 +251,7 @@ pub struct NotmuchDb {
unsafe impl Send for NotmuchDb {}
unsafe impl Sync for NotmuchDb {}
#[derive(Debug, Clone, Default)]
#[derive(Clone, Debug, Default)]
struct NotmuchMailbox {
hash: MailboxHash,
children: Vec<MailboxHash>,

View File

@ -29,7 +29,7 @@ use crate::utils::{
parsec::*,
};
#[derive(Debug, PartialEq, Clone, Serialize)]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub enum Query {
Before(UnixTimestamp),
After(UnixTimestamp),

View File

@ -21,7 +21,7 @@
use crate::utils::parsec::*;
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RuleBlock(pub Vec<Rule>);
/*
@ -40,7 +40,7 @@ pub struct RuleBlock(pub Vec<Rule>);
; "eq" means "equal to", the C operator "==".
; "ne" means "not equal to", the C operator "!=".
*/
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum ActionCommand {
Keep,
Fileinto { mailbox: String },
@ -48,7 +48,7 @@ pub enum ActionCommand {
Discard,
}
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum ControlCommand {
Stop,
Require(Vec<String>),
@ -59,27 +59,27 @@ pub enum ControlCommand {
},
}
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Rule {
Block(RuleBlock),
Action(ActionCommand),
Control(ControlCommand),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AddressOperator {
All,
Localpart,
Domain,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum IntegerOperator {
Over,
Under,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
/// RFC 5231 Sieve Email Filtering: Relational Extension
pub enum RelationalMatch {
/// "gt" means "greater than", the C operator ">".
@ -96,7 +96,7 @@ pub enum RelationalMatch {
Ne,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum MatchOperator {
Is,
Matches,
@ -105,7 +105,7 @@ pub enum MatchOperator {
Value(RelationalMatch),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum CharacterOperator {
/// i;octet,
Octet,
@ -113,7 +113,7 @@ pub enum CharacterOperator {
AsciiCasemap,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ZoneRule {
/// "year" => the year, "0000" .. "9999".
Year,
@ -158,7 +158,7 @@ pub enum ZoneRule {
Weekday,
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum ConditionRule {
/// Logical OR operation.
AnyOf(Vec<ConditionRule>),

View File

@ -88,7 +88,7 @@ use crate::{
};
/// Kind of server security (StartTLS/TLS/None) the client should attempt
#[derive(Debug, Copy, PartialEq, Eq, Clone, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
#[serde(tag = "type")]
pub enum SmtpSecurity {
#[serde(alias = "starttls", alias = "STARTTLS")]
@ -119,7 +119,7 @@ impl Default for SmtpSecurity {
}
/// Source of user's password for SMTP authentication
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
#[serde(tag = "type", content = "value")]
pub enum Password {
#[serde(alias = "raw")]
@ -129,7 +129,7 @@ pub enum Password {
}
/// Kind of server authentication the client should attempt
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
#[serde(tag = "type")]
pub enum SmtpAuth {
#[serde(alias = "none")]
@ -152,7 +152,7 @@ pub enum SmtpAuth {
// md5, sasl, etc
}
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize, Default)]
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
pub struct SmtpAuthType {
plain: bool,
login: bool,
@ -169,7 +169,7 @@ impl SmtpAuth {
}
/// Server configuration for connecting the SMTP client
#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct SmtpServerConf {
pub hostname: String,
pub port: u16,
@ -184,7 +184,7 @@ pub struct SmtpServerConf {
//example: "SIZE 52428800", "8BITMIME", "PIPELINING", "CHUNKING", "PRDR",
/// Configured SMTP extensions to use
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct SmtpExtensionSupport {
#[serde(default = "crate::conf::true_val")]
pipelining: bool,
@ -826,7 +826,7 @@ impl SmtpConnection {
pub type ExpectedReplyCode = Option<(ReplyCode, &'static [ReplyCode])>;
/// Recognized kinds of SMTP reply codes
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ReplyCode {
/// System status, or system help reply
_211,
@ -1006,7 +1006,7 @@ impl TryFrom<&'_ str> for ReplyCode {
}
/// A single line or multi-line server reply, along with its reply code
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct Reply<'s> {
pub code: ReplyCode,
pub lines: SmallVec<[&'s str; 16]>,
@ -1123,7 +1123,7 @@ mod test {
use super::*;
const ADDRESS: &str = "localhost:8825";
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
enum Message {
Helo,
Mail {
@ -1147,7 +1147,7 @@ mod test {
type QueuedMail = ((IpAddr, String), Message);
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
struct MyHandler {
mails: Arc<Mutex<Vec<QueuedMail>>>,
stored: Arc<Mutex<Vec<(String, crate::Envelope)>>>,

View File

@ -31,7 +31,7 @@ use super::{
types::{LineBreakClass, Reflow},
};
#[derive(Default, Debug, Eq, PartialEq, Copy, Clone)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum LineBreakCandidate {
MandatoryBreak,
BreakAllowed,
@ -1205,7 +1205,7 @@ mod segment_tree {
use smallvec::SmallVec;
#[derive(Default, Debug, Clone)]
#[derive(Clone, Debug, Default)]
pub(super) struct SegmentTree {
array: SmallVec<[usize; 1024]>,
tree: SmallVec<[usize; 1024]>,
@ -1282,7 +1282,7 @@ mod segment_tree {
/// A lazy stateful iterator for line breaking text. Useful for very long text
/// where you don't want to linebreak it completely before user requests
/// specific lines.
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct LineBreakText {
text: String,
reflow: Reflow,
@ -1292,7 +1292,7 @@ pub struct LineBreakText {
state: ReflowState,
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
enum ReflowState {
No {
cur_index: usize,
@ -1323,7 +1323,7 @@ impl ReflowState {
}
}
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
enum LineBreakTextState {
AtLine {
cur_index: usize,

View File

@ -20,7 +20,7 @@
*/
#[allow(clippy::upper_case_acronyms)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum LineBreakClass {
BK,
CM,
@ -123,7 +123,7 @@ impl From<&str> for LineBreakClass {
}
}
#[derive(PartialEq, Eq, Debug, Copy, Clone, Default)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum Reflow {
No,
All,

View File

@ -465,7 +465,7 @@ impl SubjectPrefix for &str {
}
}
#[derive(Default, Clone, Debug, Deserialize, Serialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct Thread {
pub root: ThreadNodeHash,
pub date: UnixTimestamp,

View File

@ -92,7 +92,7 @@ extern "C" {
#[cfg(not(target_os = "openbsd"))]
#[repr(i32)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy)]
#[allow(dead_code)]
enum LocaleCategoryMask {
Time = libc::LC_TIME_MASK,
@ -104,7 +104,7 @@ const _LC_LAST: c_int = 7;
#[cfg(target_os = "openbsd")]
#[repr(i32)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy)]
#[allow(dead_code)]
enum LocaleCategoryMask {
Time = 1 << libc::LC_TIME,
@ -112,7 +112,7 @@ enum LocaleCategoryMask {
}
#[repr(i32)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy)]
#[allow(dead_code)]
enum LocaleCategory {
Time = libc::LC_TIME,

View File

@ -31,7 +31,7 @@ use std::{
use log::{Level, LevelFilter, Log, Metadata, Record};
#[derive(Copy, Clone, Default, Eq, PartialEq, PartialOrd, Hash, Debug, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, PartialOrd, Serialize)]
#[repr(u8)]
pub enum LogLevel {
OFF = 0,
@ -125,7 +125,7 @@ impl std::fmt::Display for LogLevel {
use LogLevel::*;
#[derive(Copy, Clone, Default, Eq, PartialEq, PartialOrd, Hash, Debug, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, PartialOrd, Serialize)]
pub enum Destination {
File,
#[default]

View File

@ -48,7 +48,7 @@ pub mod html_escape {
/// ```
///
/// Source: <https://www.w3.org/MarkUp/html-spec/html-spec_9.html#SEC9.7.1>
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum HtmlEntity {
/// Less than sign
Lt,
@ -161,14 +161,14 @@ macro_rules! declare_u64_hash {
/* Sorting states. */
#[derive(Debug, Default, Clone, PartialEq, Eq, Copy, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
pub enum SortOrder {
Asc,
#[default]
Desc,
}
#[derive(Debug, Default, Clone, PartialEq, Eq, Copy, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
pub enum SortField {
Subject,
#[default]

Some files were not shown because too many files have changed in this diff Show More