pub enum ClientMessage {
Show 34 variants
Register {
username: String,
password: String,
},
Login {
username: String,
password: String,
},
Logout,
UpdatePassword(String),
UpdateColor(UserColor),
UpdateProfile {
bio: Option<String>,
url1: Option<String>,
url2: Option<String>,
url3: Option<String>,
location: Option<String>,
profile_pic: Option<String>,
cover_banner: Option<String>,
},
GetForums,
CreateForum {
name: String,
description: String,
},
DeleteForum {
forum_id: Uuid,
},
CreateThread {
forum_id: Uuid,
title: String,
content: String,
},
CreatePost {
thread_id: Uuid,
content: String,
},
CreatePostReply {
thread_id: Uuid,
content: String,
reply_to: Uuid,
},
SendDirectMessage {
to: Uuid,
content: String,
},
SendChannelMessage {
channel_id: Uuid,
content: String,
},
SendServerInvite {
to_user_id: Uuid,
server_id: Uuid,
},
RespondToServerInvite {
invite_id: Uuid,
accept: bool,
},
AcceptServerInviteFromUser {
from_user_id: Uuid,
},
DeclineServerInviteFromUser {
from_user_id: Uuid,
},
DeletePost(Uuid),
DeleteThread(Uuid),
GetUserList,
GetProfile {
user_id: Uuid,
},
GetServers,
GetChannelMessagesPaginated {
channel_id: Uuid,
cursor: PaginationCursor,
limit: Option<usize>,
direction: PaginationDirection,
},
GetDirectMessagesPaginated {
user_id: Uuid,
cursor: PaginationCursor,
limit: Option<usize>,
direction: PaginationDirection,
},
GetChannelMessages {
channel_id: Uuid,
before: Option<i64>,
},
GetChannelUserList {
channel_id: Uuid,
},
GetDMUserList,
GetDirectMessages {
user_id: Uuid,
before: Option<i64>,
},
GetNotifications {
before: Option<i64>,
},
MarkNotificationRead {
notification_id: Uuid,
},
InvalidateImageCache {
keys: Vec<String>,
},
GetCacheStats,
GetUserAvatars {
user_ids: Vec<Uuid>,
},
}Variants§
Register
Login
Logout
UpdatePassword(String)
UpdateColor(UserColor)
UpdateProfile
Fields
GetForums
CreateForum
DeleteForum
CreateThread
CreatePost
CreatePostReply
SendDirectMessage
SendChannelMessage
SendServerInvite
RespondToServerInvite
AcceptServerInviteFromUser
DeclineServerInviteFromUser
DeletePost(Uuid)
DeleteThread(Uuid)
GetUserList
GetProfile
GetServers
GetChannelMessagesPaginated
GetDirectMessagesPaginated
GetChannelMessages
GetChannelUserList
GetDMUserList
GetDirectMessages
GetNotifications
MarkNotificationRead
InvalidateImageCache
GetCacheStats
GetUserAvatars
Trait Implementations§
Source§impl Debug for ClientMessage
impl Debug for ClientMessage
Source§impl<'de> Deserialize<'de> for ClientMessage
impl<'de> Deserialize<'de> for ClientMessage
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ClientMessage
impl RefUnwindSafe for ClientMessage
impl Send for ClientMessage
impl Sync for ClientMessage
impl Unpin for ClientMessage
impl UnsafeUnpin for ClientMessage
impl UnwindSafe for ClientMessage
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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