1pub trait Service: Send + Sync {
25 fn protocol(&self) -> &[u8];
27}
28
29pub const INBOX_PROTOCOL_ID: &str = "/ma/inbox/0.0.1";
32pub const RPC_PROTOCOL_ID: &str = "/ma/rpc/0.0.1";
33pub const IPFS_PROTOCOL_ID: &str = "/ma/ipfs/0.0.1";
34pub const CRUD_PROTOCOL_ID: &str = "/ma/crud/0.0.1";
35
36pub const BROADCAST_TOPIC: &str = "/ma/broadcast/0.0.1";
38
39pub const MESSAGE_TYPE_BROADCAST: &str = "application/x-ma-broadcast";
42pub const MESSAGE_TYPE_CHAT: &str = "application/x-ma-chat";
43pub const MESSAGE_TYPE_EMOTE: &str = "application/x-ma-emote";
44pub const MESSAGE_TYPE_MESSAGE: &str = "application/x-ma-message";
45pub const MESSAGE_TYPE_IPFS_REQUEST: &str = "application/x-ma-ipfs-request";
46pub const MESSAGE_TYPE_IPFS_STORE: &str = "application/x-ma-ipfs-store";
47pub const MESSAGE_TYPE_DOC: &str = "application/x-ma-doc";
48pub const MESSAGE_TYPE_RPC: &str = "application/x-ma-rpc";
49pub const MESSAGE_TYPE_RPC_REPLY: &str = "application/x-ma-rpc-reply";
50
51pub const MESSAGE_TYPE_CRUD_GET: &str = "application/x-ma-crud-get";
54pub const MESSAGE_TYPE_CRUD_GET_REPLY: &str = "application/x-ma-crud-get-reply";
55pub const MESSAGE_TYPE_CRUD_EDIT: &str = "application/x-ma-crud-edit";
56pub const MESSAGE_TYPE_CRUD_EDIT_REPLY: &str = "application/x-ma-crud-edit-reply";
57pub const MESSAGE_TYPE_CRUD_SET: &str = "application/x-ma-crud-set";
58pub const MESSAGE_TYPE_CRUD_SET_REPLY: &str = "application/x-ma-crud-set-reply";
59pub const MESSAGE_TYPE_CRUD_DELETE: &str = "application/x-ma-crud-delete";
60pub const MESSAGE_TYPE_CRUD_DELETE_REPLY: &str = "application/x-ma-crud-delete-reply";
61
62pub const CONTENT_TYPE_CBOR: &str = "application/cbor";
65pub const CONTENT_TYPE_TERM: &str = "application/x-ma-term";