Struct imessage_database::tables::chat::Chat
source · pub struct Chat {
pub rowid: i32,
pub chat_identifier: String,
pub service_name: Option<String>,
pub display_name: Option<String>,
}Expand description
Represents a single row in the chat table.
Fields§
§rowid: i32§chat_identifier: String§service_name: Option<String>§display_name: Option<String>Implementations§
Trait Implementations§
source§impl Cacheable for Chat
impl Cacheable for Chat
source§fn cache(db: &Connection) -> Result<HashMap<Self::K, Self::V>, TableError>
fn cache(db: &Connection) -> Result<HashMap<Self::K, Self::V>, TableError>
Generate a hashmap containing each chatroom’s ID pointing to the chatroom’s metadata.
These chatroom ID’s contain duplicates and must be deduped later once we have all of the participants parsed out. On its own this data is not useful.
Example:
use imessage_database::util::dirs::default_db_path;
use imessage_database::tables::table::{Cacheable, get_connection};
use imessage_database::tables::chat::Chat;
let db_path = default_db_path();
let conn = get_connection(&db_path).unwrap();
let chatrooms = Chat::cache(&conn);type K = i32
type V = Chat
Auto Trait Implementations§
impl RefUnwindSafe for Chat
impl Send for Chat
impl Sync for Chat
impl Unpin for Chat
impl UnwindSafe for Chat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more