pub struct Chat {Show 14 fields
pub id: i64,
pub title: String,
pub space_id: Option<i64>,
pub description: Option<String>,
pub emoji: Option<String>,
pub is_public: Option<bool>,
pub last_msg_id: Option<i64>,
pub peer_id: Option<Peer>,
pub date: Option<i64>,
pub created_by: Option<i64>,
pub parent_chat_id: Option<i64>,
pub parent_message_id: Option<i64>,
pub untitled: Option<bool>,
pub number: Option<i32>,
}Expand description
A thread
Fields§
§id: i64§title: StringTitle
space_id: Option<i64>If it belongs to a space
description: Option<String>Optional description
emoji: Option<String>Emoji to show as the icon, can be null
is_public: Option<bool>If true, everyone in parent space can accces it
last_msg_id: Option<i64>Last message ID
peer_id: Option<Peer>ID of the peer that this chat belongs to
date: Option<i64>Date of creation
created_by: Option<i64>Creator user ID
parent_chat_id: Option<i64>Structural parent chat for linked subthreads.
parent_message_id: Option<i64>Parent message anchor when this subthread is a reply thread.
untitled: Option<bool>True when this thread has not been explicitly titled.
number: Option<i32>Per-space thread number. Unset for home threads and pre-backfill space threads.
Implementations§
Source§impl Chat
impl Chat
Sourcepub fn space_id(&self) -> i64
pub fn space_id(&self) -> i64
Returns the value of space_id, or the default value if space_id is unset.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description, or the default value if description is unset.
Sourcepub fn emoji(&self) -> &str
pub fn emoji(&self) -> &str
Returns the value of emoji, or the default value if emoji is unset.
Sourcepub fn is_public(&self) -> bool
pub fn is_public(&self) -> bool
Returns the value of is_public, or the default value if is_public is unset.
Sourcepub fn last_msg_id(&self) -> i64
pub fn last_msg_id(&self) -> i64
Returns the value of last_msg_id, or the default value if last_msg_id is unset.
Sourcepub fn created_by(&self) -> i64
pub fn created_by(&self) -> i64
Returns the value of created_by, or the default value if created_by is unset.
Sourcepub fn parent_chat_id(&self) -> i64
pub fn parent_chat_id(&self) -> i64
Returns the value of parent_chat_id, or the default value if parent_chat_id is unset.
Sourcepub fn parent_message_id(&self) -> i64
pub fn parent_message_id(&self) -> i64
Returns the value of parent_message_id, or the default value if parent_message_id is unset.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Chat
impl<'de> Deserialize<'de> for Chat
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Chat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Chat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Message for Chat
impl Message for Chat
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.