Skip to main content

Crate room_protocol

Crate room_protocol 

Source

Structs§

RoomConfig
Configuration for a room’s access controls and metadata.
RoomListEntry
Entry returned by room listing (discovery).

Enums§

DmRoomError
Error returned when constructing a DM room ID with invalid inputs.
Message
Wire format for all messages stored in the chat file and sent over the socket.
RoomVisibility
Visibility level for a room, controlling who can discover and join it.
SubscriptionTier
Subscription tier for a user’s relationship with a room.

Functions§

dm_room_id
Compute the deterministic room ID for a DM between two users.
format_message_id
Format a human-readable message ID from a room ID and sequence number.
is_dm_room
Check whether a room ID represents a DM room.
make_command
make_dm
make_join
make_leave
make_message
make_reply
make_system
parse_client_line
Parse a raw line from a client socket. JSON envelope → Message with broker-assigned id/room/ts. Plain text → Message::Message with broker-assigned metadata.
parse_mentions
Extract @mentions from message content.
parse_message_id
Parse a human-readable message ID back into (room_id, seq).