mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
Improve documentation, mostly by hiding behind pub(crate)
This commit is contained in:
@@ -46,26 +46,17 @@ pub struct MimeMessage {
|
||||
pub is_system_message: SystemMessage,
|
||||
pub location_kml: Option<location::Kml>,
|
||||
pub message_kml: Option<location::Kml>,
|
||||
pub user_avatar: Option<AvatarAction>,
|
||||
pub group_avatar: Option<AvatarAction>,
|
||||
pub(crate) user_avatar: Option<AvatarAction>,
|
||||
pub(crate) group_avatar: Option<AvatarAction>,
|
||||
pub(crate) reports: Vec<Report>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum AvatarAction {
|
||||
pub(crate) enum AvatarAction {
|
||||
Delete,
|
||||
Change(String),
|
||||
}
|
||||
|
||||
impl AvatarAction {
|
||||
pub fn is_change(&self) -> bool {
|
||||
match self {
|
||||
AvatarAction::Delete => false,
|
||||
AvatarAction::Change(_) => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Display, Clone, Copy, PartialEq, Eq, FromPrimitive, ToPrimitive, ToSql, FromSql)]
|
||||
#[repr(i32)]
|
||||
pub enum SystemMessage {
|
||||
@@ -1094,6 +1085,15 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::test_utils::*;
|
||||
|
||||
impl AvatarAction {
|
||||
pub fn is_change(&self) -> bool {
|
||||
match self {
|
||||
AvatarAction::Delete => false,
|
||||
AvatarAction::Change(_) => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dc_mimeparser_crash() {
|
||||
let context = dummy_context();
|
||||
|
||||
Reference in New Issue
Block a user