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.

hub

Hubs, permission management, channel management and member management.

permission

Permissions are defined here.

prelude

Re-export important types, functions and constants.

user

User management.

Macros

check_permission

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

Enums

ApiError

General errors that can occur when using the WICRS API.

DataError

Errors related to data processing.

Constants

MAX_NAME_LENGTH

Maximum length of a name in characters.

MESSAGE_MAX_SIZE

Maximum size of a message in bytes.

MIN_NAME_LENGTH

Minimum length of a name in characters.

NAME_ALLOWED_CHARS

List of characters that can be used in a username.

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.

Result