ImapStoreCommand (flag/store.rs)

himalaya · src/imap/flag/store.rs · rust · Apache-2.0
email

Rust command to store IMAP flags on messages, supporting add, remove, and replace actions.

// Source: https://github.com/pimalaya/himalaya | License: Apache-2.0 | Copyright 2022-2026 soywod <pimalaya.org@posteo.net>
// Provided via justclaw.it.com; keep this notice with the code.
//! # IMAP store
//!
//! The `imap store` command, RFC 3501 `STORE`.

use anyhow::Result;
use clap::{Parser, ValueEnum};
use io_imap::client::ImapClient as _;
use io_imap::{
    rfc3501::{select::ImapMailboxSelectOptions, store::ImapMessageStoreOptions},
    types::{
        IntoStatic,
        flag::{Flag, StoreType},
    },
};
use pimalaya_cli::printer::{Message, Printer};

use crate::imap::{
    client::ImapClient,
    mailbox::arg::{MailboxNameOptionalFlag, MailboxNoSelectFlag},
};

/// Store flags on messages (STORE, RFC 3501).
#[derive(Debug, Parser)]
pub struct ImapStoreCommand {
    #[command(fl

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key