logo
pub enum MatrixVersion {
    V1_0,
    V1_1,
    V1_2,
    V1_3,
}
Available on crate feature api only.
Expand description

The Matrix versions Ruma currently understands to exist.

Matrix, since fall 2021, has a quarterly release schedule, using a global vX.Y versioning scheme.

Every new minor version denotes stable support for endpoints in a relatively backwards-compatible manner.

Matrix has a deprecation policy, read more about it here: https://spec.matrix.org/v1.2/#deprecation-policy.

Ruma keeps track of when endpoints are added, deprecated, and removed. It’ll automatically select the right endpoint stability variation to use depending on which Matrix versions you pass to try_into_http_request, see its respective documentation for more information.

Variants

V1_0

Version 1.0 of the Matrix specification.

Retroactively defined as https://spec.matrix.org/v1.2/#legacy-versioning.

V1_1

Version 1.1 of the Matrix specification, released in Q4 2021.

See https://spec.matrix.org/v1.1/.

V1_2

Version 1.2 of the Matrix specification, released in Q1 2022.

See https://spec.matrix.org/v1.2/.

V1_3

Version 1.3 of the Matrix specification, released in Q2 2022.

See https://spec.matrix.org/v1.3/.

Implementations

Checks whether a version is compatible with another.

A is compatible with B as long as B is equal or less, so long as A and B have the same major versions.

For example, v1.2 is compatible with v1.1, as it is likely only some additions of endpoints on top of v1.1, but v1.1 would not be compatible with v1.2, as v1.1 cannot represent all of v1.2, in a manner similar to set theory.

Warning: Matrix has a deprecation policy, and Matrix versioning is not as straight-forward as this function makes it out to be. This function only exists to prune major version differences, and versions too new for self.

This (considering if major versions are the same) is equivalent to a self >= other check.

Decompose the Matrix version into its major and minor number.

Try to turn a pair of (major, minor) version components back into a MatrixVersion.

Get the default RoomVersionId for this MatrixVersion.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more