#[non_exhaustive]pub struct ChatInfo {
pub id: ChatId,
pub type_: u32,
pub name: String,
pub archived: bool,
pub param: String,
pub gossiped_timestamp: i64,
pub is_sending_locations: bool,
pub color: u32,
pub profile_image: PathBuf,
pub draft: String,
pub is_muted: bool,
pub ephemeral_timer: Timer,
}
Expand description
The current state of a chat.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: ChatId
The chat ID.
type_: u32
The type of chat as a u32
representation of Chattype.
On the C API this number is one of the
DC_CHAT_TYPE_UNDEFINED
, DC_CHAT_TYPE_SINGLE
,
or DC_CHAT_TYPE_GROUP
constants.
name: String
The name of the chat.
archived: bool
Whether the chat is archived.
param: String
The “params” of the chat.
This is the string-serialised version of Params
currently.
gossiped_timestamp: i64
Last time this client sent autocrypt gossip headers to this chat.
is_sending_locations: bool
Whether this chat is currently sending location-stream messages.
color: u32
Colour this chat should be represented in by the UI.
Yes, spelling colour is hard.
profile_image: PathBuf
The path to the profile image.
If there is no profile image set this will be an empty string currently.
draft: String
The draft message text.
If the chat has not draft this is an empty string.
TODO: This doesn’t seem rich enough, it can not handle drafts
which contain non-text parts. Perhaps it should be a
simple has_draft
bool instead.
is_muted: bool
Whether the chat is muted
The exact time its muted can be found out via the chat.mute_duration
property
ephemeral_timer: Timer
Ephemeral message timer.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ChatInfo
impl<'de> Deserialize<'de> for ChatInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ChatInfo
impl StructuralPartialEq for ChatInfo
Auto Trait Implementations§
impl Freeze for ChatInfo
impl RefUnwindSafe for ChatInfo
impl Send for ChatInfo
impl Sync for ChatInfo
impl Unpin for ChatInfo
impl UnwindSafe for ChatInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.