#[non_exhaustive]pub enum ChatInfo {
Direct {
contact: Contact,
undocumented: Value,
},
Group {
group_info: GroupInfo,
group_chat_scope: Option<GroupChatScopeInfo>,
undocumented: Value,
},
Local {
note_folder: NoteFolder,
undocumented: Value,
},
ContactRequest {
contact_request: UserContactRequest,
undocumented: Value,
},
ContactConnection {
contact_connection: PendingContactConnection,
undocumented: Value,
},
Undocumented(Value),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl ChatInfo
impl ChatInfo
pub fn make_direct(contact: Contact) -> ChatInfo
pub fn make_group( group_info: GroupInfo, group_chat_scope: Option<GroupChatScopeInfo>, ) -> ChatInfo
pub fn make_local(note_folder: NoteFolder) -> ChatInfo
pub fn make_contact_request(contact_request: UserContactRequest) -> ChatInfo
pub fn make_contact_connection( contact_connection: PendingContactConnection, ) -> ChatInfo
Source§impl ChatInfo
impl ChatInfo
pub fn direct(&self) -> Option<&Contact>
pub fn group(&self) -> Option<ChatInfoGroupRef<'_>>
pub fn local(&self) -> Option<&NoteFolder>
pub fn contact_request(&self) -> Option<&UserContactRequest>
pub fn contact_connection(&self) -> Option<&PendingContactConnection>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChatInfo
impl<'de> Deserialize<'de> for ChatInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChatInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChatInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ChatInfo
impl Serialize for ChatInfo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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 UnsafeUnpin for ChatInfo
impl UnwindSafe for ChatInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more