Improve api documentation
This commit is contained in:
parent
5ac16db3fc
commit
b2400b60ad
2 changed files with 11 additions and 4 deletions
|
|
@ -1,4 +1,7 @@
|
||||||
//! Chat room commands.
|
//! Chat room commands.
|
||||||
|
//!
|
||||||
|
//! These commands are available to the client once a session successfully joins
|
||||||
|
//! a room.
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
|
@ -17,8 +20,9 @@ pub struct GetMessageReply(pub Message);
|
||||||
|
|
||||||
/// Request messages from the room's message log.
|
/// Request messages from the room's message log.
|
||||||
///
|
///
|
||||||
/// This can be used to supplement the log provided by snapshot-event (for
|
/// This can be used to supplement the log provided by
|
||||||
/// example, when scrolling back further in history).
|
/// [`SnapshotEvent`](super::SnapshotEvent) (for example, when scrolling back
|
||||||
|
/// further in history).
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct Log {
|
pub struct Log {
|
||||||
/// Maximum number of messages to return (up to 1000).
|
/// Maximum number of messages to return (up to 1000).
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
//! Session commands.
|
//! Session commands.
|
||||||
|
//!
|
||||||
|
//! Session management commands are involved in the initial handshake and
|
||||||
|
//! maintenance of a session.
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
|
@ -6,8 +9,8 @@ use super::{AuthOption, Time};
|
||||||
|
|
||||||
/// Attempt to join a private room.
|
/// Attempt to join a private room.
|
||||||
///
|
///
|
||||||
/// This should be sent in response to a bounce event at the beginning of a
|
/// This should be sent in response to a [`BounceEvent`](super::BounceEvent) at
|
||||||
/// session.
|
/// the beginning of a session.
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct Auth {
|
pub struct Auth {
|
||||||
/// The method of authentication.
|
/// The method of authentication.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue