Crate wicrs_server[][src]

Modules

api

Public API for performing user actions, should be used for creating API implementations like the HTTP API or similar.

auth

Authentication handling.

channel

Message storage and retreival for channels.

config

Various objects for storing configuration.

error

Errors

httpapi

Definition of the HTTP API.

hub

Hubs, permission management, channel management and member management.

permission

Permissions are defined here.

server

Server implementation.

user

User management.

websocket

Definition of the WebSocket API.

Macros

check_permission

Checks that a hub member has a given permission and returns an error if it doesn’t.

Constants

MAX_DESCRIPTION_SIZE

Maximum size of a description in bytes. Clients should be able to accept larger and smaller values.

MAX_NAME_SIZE

Maximum size of a username in bytes. Clients should be able to accept larger and smaller values.

MAX_STATUS_SIZE

Maximum size of a user status in bytes. Clients should be able to accept larger and smaller values.

MESSAGE_MAX_SIZE

Maximum size of a message in bytes. Clients should be able to accept larger and smaller values.

USER_AGENT_STRING

String to identify the version of the library, used for external requests.

Functions

check_name_validity

Wraps is_valid_name to return a Result<()>.

get_system_millis

Get the current time in milliseconds since Unix Epoch.

is_valid_name

Checks if a name is valid (not too long and only allowed characters).

new_id

Generates a new random ID.

Type Definitions

ID

Type used to represent IDs throughout wicrs.