chat-core — API
Accounts
Section titled “Accounts”pub struct AccountsEncryptPreference
Section titled “EncryptPreference”pub enum EncryptPreferenceAheader
Section titled “Aheader”pub struct AheaderBlobObject<‘a>
Section titled “BlobObject<‘a>”pub struct BlobObject<'a>CallInfo
Section titled “CallInfo”pub struct CallInfoCallState
Section titled “CallState”pub enum CallStatepub async fn call_state(context: &Context, msg_id: MsgId) -> Result<CallState>pub async fn ice_servers(context: &Context) -> Result<String>WhoCanCallMe
Section titled “WhoCanCallMe”pub enum WhoCanCallMeChatItem
Section titled “ChatItem”pub enum ChatItemChatId(u32);
Section titled “ChatId(u32);”pub struct ChatId(u32);pub struct ChatChatVisibility
Section titled “ChatVisibility”pub enum ChatVisibilityChatInfo
Section titled “ChatInfo”pub struct ChatInfopub async fn is_contact_in_chat(pub async fn send_msg(context: &Context, chat_id: ChatId, msg: &mut Message) -> Result<MsgId>pub async fn send_msg_sync(context: &Context, chat_id: ChatId, msg: &mut Message) -> Result<MsgId>pub async fn send_text_msg(pub async fn send_edit_request(context: &Context, msg_id: MsgId, new_text: String) -> Result<()>MessageListOptions
Section titled “MessageListOptions”pub struct MessageListOptionspub async fn get_chat_msgs(context: &Context, chat_id: ChatId) -> Result<Vec<ChatItem>>pub async fn get_chat_msgs_ex(pub async fn marknoticed_all_chats(context: &Context) -> Result<()>pub async fn marknoticed_chat(context: &Context, chat_id: ChatId) -> Result<()>pub async fn markfresh_chat(context: &Context, chat_id: ChatId) -> Result<()>pub async fn get_chat_media(pub async fn get_chat_contacts(context: &Context, chat_id: ChatId) -> Result<Vec<ContactId>>pub async fn get_past_chat_contacts(context: &Context, chat_id: ChatId) -> Result<Vec<ContactId>>pub async fn create_group(context: &Context, name: &str) -> Result<ChatId>pub async fn create_group_unencrypted(context: &Context, name: &str) -> Result<ChatId>pub async fn create_broadcast(context: &Context, chat_name: String) -> Result<ChatId>pub async fn add_contact_to_chat(MuteDuration
Section titled “MuteDuration”pub enum MuteDurationpub async fn set_muted(context: &Context, chat_id: ChatId, duration: MuteDuration) -> Result<()>pub async fn remove_contact_from_chat(pub async fn set_chat_description(pub async fn get_chat_description(context: &Context, chat_id: ChatId) -> Result<String>pub async fn set_chat_name(context: &Context, chat_id: ChatId, new_name: &str) -> Result<()>pub async fn set_chat_profile_image(pub async fn forward_msgs(context: &Context, msg_ids: &[MsgId], chat_id: ChatId) -> Result<()>pub async fn forward_msgs_2ctx(pub async fn save_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()>pub async fn resend_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()>pub async fn add_device_msg_with_importance(pub async fn add_device_msg(pub async fn was_device_msg_ever_added(context: &Context, label: &str) -> Result<bool>Chatlist
Section titled “Chatlist”pub struct Chatlistpub async fn get_archived_cnt(context: &Context) -> Result<usize>pub async fn get_last_message_for_chat(str_to_color(s:
Section titled “str_to_color(s:”pub fn str_to_color(s: &str) -> u32color_int_to_hex_string(color:
Section titled “color_int_to_hex_string(color:”pub fn color_int_to_hex_string(color: u32) -> StringConfig
Section titled “Config”pub enum Configpub async fn get_all_ui_config_keys(context: &Context) -> Result<Vec<String>>pub enum ErrorBlocked
Section titled “Blocked”pub enum BlockedMediaQuality
Section titled “MediaQuality”pub enum MediaQualityChattype
Section titled “Chattype”pub enum ChattypeContactId(u32);
Section titled “ContactId(u32);”pub struct ContactId(u32);pub async fn make_vcard(context: &Context, contacts: &[ContactId]) -> Result<String>pub async fn import_vcard(context: &Context, vcard: &str) -> Result<Vec<ContactId>>Contact
Section titled “Contact”pub struct ContactOrigin
Section titled “Origin”pub enum Originget_color(is_self:
Section titled “get_color(is_self:”pub fn get_color(is_self: bool, addr: &str, fingerprint: &Option<Fingerprint>) -> u32ContextBuilder
Section titled “ContextBuilder”pub struct ContextBuilderContext
Section titled “Context”pub struct ContextInnerContext
Section titled “InnerContext”pub struct InnerContextget_info()
Section titled “get_info()”pub fn get_info() -> BTreeMap<&'static str, String>DebugEventLogData
Section titled “DebugEventLogData”pub struct DebugEventLogDatapub async fn debug_logging_loop(context: &Context, events: Receiver<DebugEventLogData>)pub async fn maybe_set_logging_xdc(pub async fn maybe_set_logging_xdc_inner(get_encrypted_pgp_message_boxed<‘a>(
Section titled “get_encrypted_pgp_message_boxed<‘a>(”pub fn get_encrypted_pgp_message_boxed<'a>(get_encrypted_mime<‘a,
Section titled “get_encrypted_mime<‘a,”pub fn get_encrypted_mime<'a, 'b>(mail: &'a ParsedMail<'b>) -> Option<&'a ParsedMail<'b>>dehtml_manually(buf:
Section titled “dehtml_manually(buf:”pub fn dehtml_manually(buf: &str) -> StringDownloadState
Section titled “DownloadState”pub enum DownloadStatePostMsgMetadata
Section titled “PostMsgMetadata”src/download/post_msg_metadata.rs
pub struct PostMsgMetadataEncryptHelper
Section titled “EncryptHelper”pub struct EncryptHelperpub async fn ensure_secret_key_exists(context: &Context) -> Result<()>pub enum TimerEvents
Section titled “Events”pub struct EventsEventEmitter(Mutex<async_broadcast::Receiver<Event>>);
Section titled “EventEmitter(Mutex<async_broadcast::Receiver<Event>>);”pub struct EventEmitter(Mutex<async_broadcast::Receiver<Event>>);pub struct EventEventType
Section titled “EventType”pub enum EventTypeHeaderDef
Section titled “HeaderDef”pub enum HeaderDefHeaderDefMap
Section titled “HeaderDefMap”pub trait HeaderDefMapFolderMeaning
Section titled “FolderMeaning”pub enum FolderMeaningpub async fn target_folder_cfg(pub async fn target_folder(pub enum ErrorImexMode
Section titled “ImexMode”pub enum ImexModepub async fn imex(pub async fn has_backup(_context: &Context, dir_name: &Path) -> Result<String>BackupProvider
Section titled “BackupProvider”pub struct BackupProviderpub async fn get_backup2(pub async fn get_backup(context: &Context, qr: Qr) -> Result<()>key_from_asc(data:
Section titled “key_from_asc(data:”pub fn key_from_asc(data: &str) -> Result<key::SignedSecretKey>pub async fn store_self_keypair(context: &Context, keypair: &key::SignedSecretKey) -> Result<()>pub async fn parse_and_get_text(context: &Context, imf_raw: &[u8]) -> Result<String>pub async fn save_broadcast_secret(context: &Context, chat_id: ChatId, secret: &str) -> Result<()>create_dummy_keypair(addr:
Section titled “create_dummy_keypair(addr:”pub fn create_dummy_keypair(addr: &str) -> Result<key::SignedSecretKey>create_broadcast_secret()
Section titled “create_broadcast_secret()”pub fn create_broadcast_secret() -> StringDcKey:
Section titled “DcKey:”pub trait DcKey: Serialize + Deserializable + Clonepub async fn preconfigure_keypair(context: &Context, secret_data: &str) -> Result<()>Fingerprint(Vec<u8>);
Section titled “Fingerprint(Vec<u8>);”pub struct Fingerprint(Vec<u8>);Location
Section titled “Location”pub struct Locationpub struct Kmlpub async fn send_to_chat(context: &Context, chat_id: ChatId, seconds: i64) -> Result<()>pub async fn is_sending(context: &Context) -> Result<bool>pub async fn is_sending_to_chat(context: &Context, chat_id: ChatId) -> Result<bool>pub async fn stop_sending(context: &Context) -> Result<()>pub async fn set(context: &Context, latitude: f64, longitude: f64, accuracy: f64) -> Result<bool>pub async fn get_range(pub async fn get_kml(context: &Context, chat_id: ChatId) -> Result<Option<(String, u32)>>get_message_kml(timestamp:
Section titled “get_message_kml(timestamp:”pub fn get_message_kml(timestamp: i64, latitude: f64, longitude: f64) -> Stringpub async fn set_kml_sent_timestamp(pub async fn set_msg_location_id(context: &Context, msg_id: MsgId, location_id: u32) -> Result<()>LogExt<T,
Section titled “LogExt<T,”pub trait LogExt<T, E>EnteredCertificateChecks
Section titled “EnteredCertificateChecks”pub enum EnteredCertificateChecksEnteredImapLoginParam
Section titled “EnteredImapLoginParam”pub struct EnteredImapLoginParamEnteredSmtpLoginParam
Section titled “EnteredSmtpLoginParam”pub struct EnteredSmtpLoginParamTransportListEntry
Section titled “TransportListEntry”pub struct TransportListEntryEnteredLoginParam
Section titled “EnteredLoginParam”pub struct EnteredLoginParamMsgId(u32);
Section titled “MsgId(u32);”pub struct MsgId(u32);Message
Section titled “Message”pub struct MessageMessageState
Section titled “MessageState”pub enum MessageStatepub async fn get_msg_read_receipts(pub async fn get_msg_read_receipt_count(context: &Context, msg_id: MsgId) -> Result<usize>pub async fn delete_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()>pub async fn delete_msgs_ex(pub async fn markseen_msgs(context: &Context, msg_ids: Vec<MsgId>) -> Result<()>pub async fn get_existing_msg_ids(context: &Context, ids: &[MsgId]) -> Result<Vec<MsgId>>pub async fn get_unblocked_msg_cnt(context: &Context) -> usizepub async fn get_request_msg_cnt(context: &Context) -> usizepub async fn estimate_deletion_cnt(Viewtype
Section titled “Viewtype”pub enum ViewtypeLoaded
Section titled “Loaded”pub enum LoadedPreMessageMode
Section titled “PreMessageMode”pub enum PreMessageModeMimeFactory
Section titled “MimeFactory”pub struct MimeFactoryRenderedEmail
Section titled “RenderedEmail”pub struct RenderedEmailGossipedKey
Section titled “GossipedKey”pub struct GossipedKeySystemMessage
Section titled “SystemMessage”pub enum SystemMessagepub struct PartResponse
Section titled “Response”pub struct Responsepub async fn read_url(context: &Context, url: &str) -> Result<String>pub async fn read_url_blob(context: &Context, url: &str) -> Result<Response>