pub enum MatrixRequest {
Show 23 variants
PaginateRoomTimeline {
room_id: OwnedRoomId,
num_events: u16,
direction: PaginationDirection,
},
EditMessage {
room_id: OwnedRoomId,
timeline_event_item_id: TimelineEventItemId,
edited_content: EditedContent,
},
FetchDetailsForEvent {
room_id: OwnedRoomId,
event_id: OwnedEventId,
},
SyncRoomMemberList {
room_id: OwnedRoomId,
},
JoinRoom {
room_id: OwnedRoomId,
},
LeaveRoom {
room_id: OwnedRoomId,
},
GetRoomMembers {
room_id: OwnedRoomId,
memberships: RoomMemberships,
local_only: bool,
},
GetUserProfile {
user_id: OwnedUserId,
room_id: Option<OwnedRoomId>,
local_only: bool,
},
GetNumberUnreadMessages {
room_id: OwnedRoomId,
},
IgnoreUser {
ignore: bool,
room_member: RoomMember,
room_id: OwnedRoomId,
},
ResolveRoomAlias(OwnedRoomAliasId),
FetchMedia {
media_request: MediaRequestParameters,
content_sender: Sender<Result<Vec<u8>, Error>>,
},
SendMessage {
room_id: OwnedRoomId,
message: RoomMessageEventContent,
replied_to: Option<Reply>,
},
SendTypingNotice {
room_id: OwnedRoomId,
typing: bool,
},
SubscribeToTypingNotices {
room_id: OwnedRoomId,
subscribe: bool,
},
SubscribeToOwnUserReadReceiptsChanged {
room_id: OwnedRoomId,
subscribe: bool,
},
ReadReceipt {
room_id: OwnedRoomId,
event_id: OwnedEventId,
},
FullyReadReceipt {
room_id: OwnedRoomId,
event_id: OwnedEventId,
},
GetRoomPowerLevels {
room_id: OwnedRoomId,
},
ToggleReaction {
room_id: OwnedRoomId,
timeline_event_id: TimelineEventItemId,
reaction: String,
},
RedactMessage {
room_id: OwnedRoomId,
timeline_event_id: TimelineEventItemId,
reason: Option<String>,
},
GetMatrixRoomLinkPillInfo {
matrix_id: MatrixId,
via: Vec<OwnedServerName>,
},
CreateDMRoom {
user_id: OwnedUserId,
},
}Expand description
The set of requests for async work that can be made to the worker thread.
Variants§
PaginateRoomTimeline
Request to paginate the older (or newer) events of a room’s timeline.
EditMessage
Request to edit the content of an event in the given room’s timeline.
Fields
room_id: OwnedRoomIdtimeline_event_item_id: TimelineEventItemIdedited_content: EditedContentFetchDetailsForEvent
Request to fetch the full details of the given event in the given room’s timeline.
SyncRoomMemberList
Request to fetch profile information for all members of a room. This can be very slow depending on the number of members in the room.
Fields
room_id: OwnedRoomIdJoinRoom
Request to join the given room.
Fields
room_id: OwnedRoomIdLeaveRoom
Request to leave the given room.
Fields
room_id: OwnedRoomIdGetRoomMembers
Request to get the actual list of members in a room. This returns the list of members that can be displayed in the UI.
GetUserProfile
Request to fetch profile information for the given user ID.
Fields
user_id: OwnedUserIdroom_id: Option<OwnedRoomId>- If
Some, the user is known to be a member of a room, so this will fetch the user’s profile from that room’s membership info. - If
None, the user’s profile info will be fetched from the server in a room-agnostic manner, and no room membership info will be returned.
GetNumberUnreadMessages
Request to fetch the number of unread messages in the given room.
Fields
room_id: OwnedRoomIdIgnoreUser
Request to ignore/block or unignore/unblock a user.
Fields
room_member: RoomMemberThe room membership info of the user to (un)ignore.
room_id: OwnedRoomIdThe room ID of the room where the user is a member,
which is only needed because it isn’t present in the RoomMember object.
ResolveRoomAlias(OwnedRoomAliasId)
Request to resolve a room alias into a room ID and the servers that know about that room.
FetchMedia
Request to fetch media from the server.
Upon completion of the async media request, the on_fetched function
will be invoked with four arguments: the destination, the media_request,
the result of the media fetch, and the update_sender.
SendMessage
Request to send a message to the given room.
SendTypingNotice
Sends a notice to the given room that the current user is or is not typing.
This request does not return a response or notify the UI thread, and furthermore, there is no need to send a follow-up request to stop typing (though you certainly can do so).
SubscribeToTypingNotices
Subscribe to typing notices for the given room.
This request does not return a response or notify the UI thread.
Fields
room_id: OwnedRoomIdSubscribeToOwnUserReadReceiptsChanged
Subscribe to changes in the read receipts of our own user.
This request does not return a response or notify the UI thread.
Fields
room_id: OwnedRoomIdReadReceipt
Sends a read receipt for the given event in the given room.
FullyReadReceipt
Sends a fully-read receipt for the given event in the given room.
GetRoomPowerLevels
Sends a request to obtain the power levels for this room.
The response is delivered back to the main UI thread via [TimelineUpdate::UserPowerLevels].
Fields
room_id: OwnedRoomIdToggleReaction
Toggles the given reaction to the given event in the given room.
RedactMessage
Redacts (deletes) the given event in the given room.
GetMatrixRoomLinkPillInfo
Sends a request to obtain the room’s pill link info for the given Matrix ID.
The MatrixLinkPillInfo::Loaded variant is sent back to the main UI thread via.
CreateDMRoom
Fields
user_id: OwnedUserIdTrait Implementations§
Source§impl<'de> Deserialize<'de> for MatrixRequest
impl<'de> Deserialize<'de> for MatrixRequest
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>,
Auto Trait Implementations§
impl Freeze for MatrixRequest
impl !RefUnwindSafe for MatrixRequest
impl Send for MatrixRequest
impl Sync for MatrixRequest
impl Unpin for MatrixRequest
impl UnsafeUnpin for MatrixRequest
impl !UnwindSafe for MatrixRequest
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
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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>
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>
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