Skip to main content

ClientMessage

Enum ClientMessage 

Source
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

Fields

§username: String
§password: String
§

Login

Fields

§username: String
§password: String
§

Logout

§

UpdatePassword(String)

§

UpdateColor(UserColor)

§

UpdateProfile

Fields

§location: Option<String>
§profile_pic: Option<String>
§cover_banner: Option<String>
§

GetForums

§

CreateForum

Fields

§name: String
§description: String
§

DeleteForum

Fields

§forum_id: Uuid
§

CreateThread

Fields

§forum_id: Uuid
§title: String
§content: String
§

CreatePost

Fields

§thread_id: Uuid
§content: String
§

CreatePostReply

Fields

§thread_id: Uuid
§content: String
§reply_to: Uuid
§

SendDirectMessage

Fields

§to: Uuid
§content: String
§

SendChannelMessage

Fields

§channel_id: Uuid
§content: String
§

SendServerInvite

Fields

§to_user_id: Uuid
§server_id: Uuid
§

RespondToServerInvite

Fields

§invite_id: Uuid
§accept: bool
§

AcceptServerInviteFromUser

Fields

§from_user_id: Uuid
§

DeclineServerInviteFromUser

Fields

§from_user_id: Uuid
§

DeletePost(Uuid)

§

DeleteThread(Uuid)

§

GetUserList

§

GetProfile

Fields

§user_id: Uuid
§

GetServers

§

GetChannelMessagesPaginated

Fields

§channel_id: Uuid
§limit: Option<usize>
§

GetDirectMessagesPaginated

Fields

§user_id: Uuid
§limit: Option<usize>
§

GetChannelMessages

Fields

§channel_id: Uuid
§before: Option<i64>
§

GetChannelUserList

Fields

§channel_id: Uuid
§

GetDMUserList

§

GetDirectMessages

Fields

§user_id: Uuid
§before: Option<i64>
§

GetNotifications

Fields

§before: Option<i64>
§

MarkNotificationRead

Fields

§notification_id: Uuid
§

InvalidateImageCache

Fields

§keys: Vec<String>
§

GetCacheStats

§

GetUserAvatars

Fields

§user_ids: Vec<Uuid>

Trait Implementations§

Source§

impl Debug for ClientMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ClientMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ClientMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more