Improve api documentation

This commit is contained in:
Joscha 2022-08-22 16:45:25 +02:00
parent 5ac16db3fc
commit b2400b60ad
2 changed files with 11 additions and 4 deletions

View file

@ -1,4 +1,7 @@
//! Chat room commands.
//!
//! These commands are available to the client once a session successfully joins
//! a room.
use serde::{Deserialize, Serialize};
@ -17,8 +20,9 @@ pub struct GetMessageReply(pub Message);
/// Request messages from the room's message log.
///
/// This can be used to supplement the log provided by snapshot-event (for
/// example, when scrolling back further in history).
/// This can be used to supplement the log provided by
/// [`SnapshotEvent`](super::SnapshotEvent) (for example, when scrolling back
/// further in history).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Log {
/// Maximum number of messages to return (up to 1000).

View file

@ -1,4 +1,7 @@
//! Session commands.
//!
//! Session management commands are involved in the initial handshake and
//! maintenance of a session.
use serde::{Deserialize, Serialize};
@ -6,8 +9,8 @@ use super::{AuthOption, Time};
/// Attempt to join a private room.
///
/// This should be sent in response to a bounce event at the beginning of a
/// session.
/// This should be sent in response to a [`BounceEvent`](super::BounceEvent) at
/// the beginning of a session.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Auth {
/// The method of authentication.