Skip to main content

JmapObject

Trait JmapObject 

Source
pub trait JmapObject:
    Serialize
    + for<'de> Deserialize<'de>
    + Send
    + Sync
    + 'static {
    type Property: Send + Sync + 'static;

    const TYPE_NAME: &'static str;
}
Expand description

Marker trait for all JMAP object types.

Implement this in the types crate for each first-class JMAP object (e.g. Mailbox, Email, Chat). The TYPE_NAME constant is used in error messages and capability checks in the server crates.

Required Associated Constants§

Source

const TYPE_NAME: &'static str

The JMAP type name string (e.g. "Email", "Mailbox", "Chat").

Required Associated Types§

Source

type Property: Send + Sync + 'static

The property selector enum for this type (server-side only, no serde).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl JmapObject for Chat

Source§

const TYPE_NAME: &'static str = "Chat"

Source§

type Property = ChatProperty

Source§

impl JmapObject for ChatContact

Source§

const TYPE_NAME: &'static str = "ChatContact"

Source§

type Property = ChatContactProperty

Source§

impl JmapObject for CustomEmoji

Source§

const TYPE_NAME: &'static str = "CustomEmoji"

Source§

type Property = CustomEmojiProperty

Source§

impl JmapObject for Message

Source§

const TYPE_NAME: &'static str = "Message"

Source§

type Property = MessageProperty

Source§

impl JmapObject for PresenceStatus

Source§

const TYPE_NAME: &'static str = "PresenceStatus"

Source§

type Property = PresenceStatusProperty

Source§

impl JmapObject for ReadPosition

Source§

const TYPE_NAME: &'static str = "ReadPosition"

Source§

type Property = ReadPositionProperty

Source§

impl JmapObject for Space

Source§

const TYPE_NAME: &'static str = "Space"

Source§

type Property = SpaceProperty

Source§

impl JmapObject for SpaceBan

Source§

const TYPE_NAME: &'static str = "SpaceBan"

Source§

type Property = SpaceBanProperty

Source§

impl JmapObject for SpaceInvite

Source§

const TYPE_NAME: &'static str = "SpaceInvite"

Source§

type Property = SpaceInviteProperty

Implementors§