pub struct WebSocketClient { /* private fields */ }
Available on crate feature websocket-client only.
Expand description

Asynchronous WebSocket-based client for Misskey.

WebSocketClient can be constructed using WebSocketClient::connect or WebSocketClientBuilder. The latter is more flexible and intuitive.

You do not have to wrap this in Arc and Mutex to share it because WebSocketClient is already Clone and every methods of WebSocketClient takes &self, i.e. they does not require mutability.

Implementations

Connects to Misskey using WebSocket, and returns WebSocketClient.

Connects to Misskey using WebSocket with a given reconnect configuration, and returns WebSocketClient.

Creates a new builder instance with url. All configurations are set to default.

This function is identical to WebSocketClientBuilder::new.

Captures the note specified by id.

The returned SubNote implements Stream so that note events can be retrieved asynchronously via it.

Connects to the channel using request.

The returned Channel implements Stream and Sink so that you can exchange messages with channels on it.

Receive messages from the broadcast stream.

The returned Broadcast implements Stream so that broadcast events can be retrieved asynchronously via it.

Trait Implementations

The error type produced by the client when an error occurs.

Dispatch an API request. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The error type produced by the client when an error occurs.

Captures the note specified by note_id.

Connects to the channel using request.

Receive messages from the broadcast stream.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Gets the information of the user who is logged in with this client. Read more

Updates the user logged in with this client. Read more

Follows the specified user.

Unfollows the specified user.

Mutes the specified user.

Unmutes the specified user.

Blocks the specified user.

Unblocks the specified user.

Lists the followers of the specified user. Read more

Lists the users that the specified user is following.

Pins the specified note to the profile.

Unpins the specified note to the profile.

Lists the follow requests sent to the user logged in with this client. Read more

Cancels the follow request being sent to the specified user.

Accepts the follow request that have been received from the specified user.

Rejects the follow request that have been received from the specified user.

Lists the users muted by the user logged in with this client.

Lists the users blocked by the user logged in with this client.

Lists the notes favorited by the user logged in with this client.

Lists the notifications to the user logged in with this client. Read more

Returns the relationship between the specified user and the user logged in with this client. Read more

Checks if the specified user is followed by the user logged in with this client. Read more

Checks if the specified user follows the user logged in with this client. Read more

Checks if the specified user is blocked by the user logged in with this client. Read more

Checks if the specified user blocks the user logged in with this client. Read more

Checks if the specified user is muted by the user logged in with this client. Read more

Checks if the specified user has a pending follow request from the user logged in with this client. Read more

Checks if the specified user has a pending follow request to the user logged in with this client. Read more

Gets the corresponding user from the ID.

Gets the list of corresponding user from the list of IDs.

Reports abuse by the specified user.

Searches for users with the specified query string.

Lists the users in the instance. Read more

Lists the recommended users of the instance.

Lists the users who frequently reply to the specified user.

Lists the users pinned to the instance.

Returns a builder for composing a note. Read more

Deletes the specified note. Read more

Gets the corresponding note from the ID.

Creates a note with the given text. Read more

Creates a poll with the given text and choices. Read more

Creates a reply note with the given text.

Creates a renote.

Creates a quote note with the given text.

Adds the reaction to the specified note.

Deletes a reaction from the specified note.

Favorites the specified note.

Unfavorites the specified note.

Watches the specified note.

Unwatches the specified note.

Checks if the specified note is favorited by the user logged in with this client.

Checks if the specified note is watched by the user logged in with this client.

Vote on the specified note.

Lists the featured notes.

Lists the notes of the conversation.

Lists the reply notes to the specified note.

Lists the notes that are mentioning the account you are logged into with this client.

Lists the renotes of the specified note.

Lists the replies to the specified note.

Searches for notes with the specified query string.

Lists the notes in the specified range of the local timeline. Read more

Lists all notes since the specified point in the local timeline in reverse order (i.e. the old note comes first, the new note comes after). Read more

Returns a set of streams that fetch notes around the specified point in the local timeline in both directions.

Lists the notes in the specified range of the global timeline. Read more

Lists all notes since the specified point in the global timeline in reverse order (i.e. the old note comes first, the new note comes after). Read more

Returns a set of streams that fetch notes around the specified point in the global timeline in both directions.

Lists the notes in the specified range of the social timeline. Read more

Lists all notes since the specified point in the social timeline in reverse order (i.e. the old note comes first, the new note comes after). Read more

Returns a set of streams that fetch notes around the specified point in the social timeline in both directions.

Lists the notes in the specified range of the home timeline. Read more

Lists all notes since the specified point in the home timeline in reverse order (i.e. the old note comes first, the new note comes after). Read more

Returns a set of streams that fetch notes around the specified point in the home timeline in both directions.

Lists the notes in the specified range of the user timeline. Read more

Lists all notes since the specified point in the user timeline in reverse order (i.e. the old note comes first, the new note comes after). Read more

Returns a set of streams that fetch notes around the specified point in the user timeline in both directions.

Lists the notes in the specified range of the user_list timeline. Read more

Lists all notes since the specified point in the user_list timeline in reverse order (i.e. the old note comes first, the new note comes after). Read more

Returns a set of streams that fetch notes around the specified point in the user_list timeline in both directions.

Lists the notes with tags as specified in the given query. Read more

Lists the local notes with the given file types. Read more

Creates a user list with the given name. Read more

Deletes the specified user list. Read more

Updates the name of the specified user list to the given one. Read more

Gets the corresponding user list from the ID.

Adds the user from the specified user list.

Deletes the user from the specified user list.

Creates a user group with the given name. Read more

Deletes the specified user group. Read more

Updates the name of the specified user group to the given one. Read more

Gets the corresponding user group from the ID.

Invites the user to the specified user group.

Deletes the user from the specified user group. Read more

Transfers the specified user group. Read more

Lists the user group invitations sent to the user who is logged in with this client. Read more

Accepts the specified user group invitation sent to the user logged in with this client.

Rejects the specified user group invitation sent to the user logged in with this client.

Lists the user groups joined by the user logged in with this client.

Lists the user groups owned by the user logged in with this client.

Creates an antenna with the given name and query. Read more

Returns a builder for creating an antenna. Read more

Deletes the specified antenna. Read more

Gets the corresponding antenna from the ID.

Updates the antenna. Read more

Lists the antennas created by the user logged in with this client.

Lists the notes that hit the specified antenna.

Creates a clip with the given name. Read more

Deletes the specified clip. Read more

Lists the clips created by the user logged in with this client.

Lists the notes that are clipped to the specified clip.

Gets the corresponding clip from the ID.

Updates the name of the specified clip to the given one.

Sends a message to the user with the given text.

Sends a message to the user group with the given text.

Returns a builder for creating a message. Read more

Deletes the specified message.

Marks the specified message as read.

Lists the messages with the specified user.

Lists the messages in the specified user group.

Gets message logs for the user who is logged in with this client.

Uploads the file from the given url to the drive. Read more

Returns a builder for creating a file on the drive. Read more

Deletes the specified file on the drive.

Updates the specified file Read more

Gets the corresponding file from the ID.

Creates a folder on the drive with the given name. Read more

Creates a folder on the drive with the given name and parent folder.

Deletes the specified folder on the drive.

Updates the specified folder. Read more

Gets the corresponding folder from the ID.

Lists the notes that have the specified file attached.

Lists the files with the specified name.

Lists the files with the specified name in the folder.

Lists the folders with the specified name.

Lists the folders with the specified name in the folder.

Lists the files on the drive. Read more

Lists the folders.

Lists the folders in the folder.

Sets moderator privileges for the specified user. Read more

Removes moderator privileges for the specified user. Read more

Lists the abuse user reports. Read more

Removes the specified abuse user report. Read more

Lists the server logs in the instance. Read more

Lists the moderation logs in the instance. Read more

Silences the specified user. Read more

Suspends the specified user. Read more

Unsilences the specified user. Read more

Unsuspends the specified user. Read more

Updates the instance information. Read more

Creates an announcement with given title and text. Read more

Creates an announcement with given title, text, and image URL. Read more

Deletes the specified announcement. Read more

Updates the specified announcement. Read more

Deletes the specified emoji. Read more

Copies the specified emoji. Read more

Lists the emojis in the instance. Read more

Gets information about the instance.

Lists announcements of the instance.

Marks all notifications as read.

Returns the argument unchanged.

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

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

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

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

Calls U::from(self).

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

Should always be Self

Subscribes to the specified note and returns a stream to receive the events. Read more

Returns a stream to receive the events from the main stream. Read more

Returns a stream to receive the notes in the home timeline. Read more

Returns a stream to receive the notes in the local timeline. Read more

Returns a stream to receive the notes in the social timeline. Read more

Returns a stream to receive the notes in the global timeline. Read more

Returns a stream to receive the notes with the given hashtags.

Returns a stream to receive notes in the timeline of the specified antenna.

Returns a stream to receive notes in the timeline of the specified user list.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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

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

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