Crate ruma_common

Source
Expand description

Common types for the Ruma crates.

Re-exports§

pub use self::canonical_json::CanonicalJsonError;canonical-json
pub use self::canonical_json::CanonicalJsonObject;canonical-json
pub use self::canonical_json::CanonicalJsonValue;canonical-json

Modules§

apiapi
Core types used to define the requests and responses for each endpoint in the various Matrix API specifications.
authentication
Common types for authentication.
canonical_jsoncanonical-json
Canonical JSON types and related functions.
directory
Common types for room directory endpoints.
encryption
Common types for encryption related tasks.
http_headers
Helpers for HTTP headers.
matrix_uri
Matrix URIs.
media
Common types and functions for the content repository.
power_levels
Common types for the m.room.power_levels event.
presence
Common types for the presence module.
push
Common types for the push notifications module.
room
Common types for rooms.
serde
(De)serialization helpers for other Ruma crates.
space
Common types for spaces.
thirdparty
Common types for the third party networks module.
to_device
Common types for the Send-To-Device Messaging
user_id
Matrix user identifiers.

Macros§

base64_public_key
Compile-time checked Base64PublicKey construction.
device_id
Shorthand for <&DeviceId>::from.
event_id
Compile-time checked EventId construction.
metadataapi
Convenient constructor for Metadata constants.
mxc_uri
Compile-time checked MxcUri construction.
owned_base64_public_key
Compile-time checked OwnedBase64PublicKey construction.
owned_device_id
Shorthand for OwnedDeviceId::from.
owned_event_id
Compile-time checked OwnedEventId construction.
owned_mxc_uri
Compile-time checked OwnedMxcUri construction.
owned_room_alias_id
Compile-time checked OwnedRoomAliasId construction.
owned_room_id
Compile-time checked OwnedRoomId construction.
owned_server_name
Compile-time checked OwnedServerName construction.
owned_server_signing_key_version
Compile-time checked OwnedServerSigningKeyVersion construction.
owned_session_id
Compile-time checked OwnedSessionId construction.
owned_user_id
Compile-time checked OwnedUserId construction.
room_alias_id
Compile-time checked RoomAliasId construction.
room_id
Compile-time checked RoomId construction.
room_version_id
Compile-time checked RoomVersionId construction.
server_name
Compile-time checked ServerName construction.
server_signing_key_version
Compile-time checked ServerSigningKeyVersion construction.
session_id
Compile-time checked SessionId construction.
user_id
Compile-time checked UserId construction.

Structs§

Base64PublicKey
A public key encoded using unpadded base64, used as an identifier for cross-signing keys.
Base64PublicKeyOrDeviceId
A Matrix ID that can be either a DeviceId or a Base64PublicKey.
ClientSecret
A client secret.
DeviceId
A Matrix device ID.
EventId
A Matrix event ID.
KeyId
A key algorithm and key name delimited by a colon.
MatrixToUri
The matrix.to URI representation of a user, room or event.
MatrixUri
The matrix: URI representation of a user, room or event.
MilliSecondsSinceUnixEpoch
A timestamp represented as the number of milliseconds since the unix epoch.
MxcUri
A URI that should be a Matrix-spec compliant MXC URI.
OneTimeKeyName
The name of a one-time or fallback key.
OwnedBase64PublicKey
Owned variant of Base64PublicKey
OwnedBase64PublicKeyOrDeviceId
Owned variant of Base64PublicKeyOrDeviceId
OwnedClientSecret
Owned variant of ClientSecret
OwnedDeviceId
Owned variant of DeviceId
OwnedEventId
Owned variant of EventId
OwnedKeyId
Owned variant of KeyId
OwnedMxcUri
Owned variant of MxcUri
OwnedOneTimeKeyName
Owned variant of OneTimeKeyName
OwnedRoomAliasId
Owned variant of RoomAliasId
OwnedRoomId
Owned variant of RoomId
OwnedRoomOrAliasId
Owned variant of RoomOrAliasId
OwnedServerName
Owned variant of ServerName
OwnedServerSigningKeyVersion
Owned variant of ServerSigningKeyVersion
OwnedSessionId
Owned variant of SessionId
OwnedTransactionId
Owned variant of TransactionId
OwnedUserId
Owned variant of UserId
OwnedVoipId
Owned variant of VoipId
RoomAliasId
A Matrix room alias ID.
RoomId
A Matrix room ID.
RoomOrAliasId
A Matrix room ID or a Matrix room alias ID.
SecondsSinceUnixEpoch
A timestamp represented as the number of seconds since the unix epoch.
ServerName
A Matrix-spec compliant server name.
ServerSigningKeyVersion
The version of a homeserver signing key.
SessionId
A session ID.
Signatures
Map of all signatures, grouped by entity.
TransactionId
A Matrix transaction ID.
UserId
A Matrix user ID.
VoipId
A VoIP identifier.

Enums§

DeviceKeyAlgorithm
The algorithms for the device keys defined in the Matrix spec.
EventEncryptionAlgorithm
An encryption algorithm to be used to encrypt messages sent to a room.
IdParseError
An error encountered when trying to parse an invalid ID string.
KeyDerivationAlgorithm
A key algorithm to be used to generate a key from a passphrase.
MatrixIdError
An error occurred while validating a MatrixId.
MatrixToError
An error occurred while validating a matrix.to URI.
MatrixUriError
An error occurred while validating a MatrixURI.
MxcUriError
An error occurred while validating an MXC URI.
OneTimeKeyAlgorithm
The algorithms for one-time and fallback keys defined in the Matrix spec.
RoomVersionId
A Matrix room version ID.
SigningKeyAlgorithm
The signing key algorithms defined in the Matrix spec.
VoipVersionId
A Matrix VoIP version ID.
VoipVersionIdError
An error occurred while validating a VoipVersionId.

Traits§

KeyAlgorithm
The algorithm of a key.
KeyName
Helper trait to validate the name of a key.

Type Aliases§

CrossSigningKeyId
Algorithm + key name for cross-signing keys.
CrossSigningOrDeviceSignatures
Map of cross-signing or device signatures, grouped by user.
CrossSigningOrDeviceSigningKeyId
Algorithm + key name for cross-signing or device signing keys.
DeviceKeyId
Algorithm + key name for device keys.
DeviceSignatures
Map of device signatures, grouped by user.
DeviceSigningKeyId
Algorithm + key name for device signing keys.
EntitySignatures
Map of key identifier to signature values.
OneTimeKeyId
Algorithm + key name for one-time and fallback keys.
OwnedCrossSigningKeyId
Algorithm + key name for cross-signing keys.
OwnedCrossSigningOrDeviceSigningKeyId
Algorithm + key name for cross-signing or device signing keys.
OwnedDeviceKeyId
Algorithm + key name for device keys.
OwnedDeviceSigningKeyId
Algorithm + key name for [device signing] keys.
OwnedOneTimeKeyId
Algorithm + key name for one-time and fallback keys.
OwnedServerSigningKeyId
Algorithm + key name for homeserver signing keys.
OwnedSigningKeyId
Algorithm + key name for signing keys.
ServerSignatures
Map of server signatures, grouped by server.
ServerSigningKeyId
Algorithm + key name for homeserver signing keys.
SigningKeyId
Algorithm + key name for signing keys.