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", so this trait is not object safe.

Implementors§