mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-19 23:25:14 +08:00
clean msg flags, merge tpl entity in msg (#231)
* merge tpl entity into msg * change envelope subject type to cow * msg: fix save command when raw msg comes from stdin * msg: clean flags
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
pub use imap::types::Flag;
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
|
||||
/// Serializable wrapper arround [`imap::types::Flag`].
|
||||
/// Represents a serializable `imap::types::Flag`.
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct SerializableFlag<'a>(pub &'a Flag<'a>);
|
||||
|
||||
/// Implements the serialize trait for `imap::types::Flag`.
|
||||
/// Remote serialization cannot be used because of the [#[non_exhaustive]] directive of
|
||||
/// `imap::types::Flag`.
|
||||
///
|
||||
/// [#[non_exhaustive]]: https://github.com/serde-rs/serde/issues/1991
|
||||
impl<'a> Serialize for SerializableFlag<'a> {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user