Struct SupportedVersions
pub struct SupportedVersions {
pub versions: BTreeSet<MatrixVersion>,
pub features: BTreeSet<FeatureFlag>,
}Expand description
The list of Matrix versions and features supported by a homeserver.
Fields§
§versions: BTreeSet<MatrixVersion>The Matrix versions that are supported by the homeserver.
This set contains only known versions.
features: BTreeSet<FeatureFlag>The features that are supported by the homeserver.
This matches the unstable_features field of the /versions endpoint, without the boolean
value.
Implementations§
§impl SupportedVersions
impl SupportedVersions
pub fn from_parts(
versions: &[String],
unstable_features: &BTreeMap<String, bool>,
) -> SupportedVersions
pub fn from_parts( versions: &[String], unstable_features: &BTreeMap<String, bool>, ) -> SupportedVersions
Construct a SupportedVersions from the parts of a /versions response.
Matrix versions that can’t be parsed to a MatrixVersion, and features with the boolean
value set to false are discarded.
Trait Implementations§
§impl Clone for SupportedVersions
impl Clone for SupportedVersions
§fn clone(&self) -> SupportedVersions
fn clone(&self) -> SupportedVersions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SupportedVersions
impl RefUnwindSafe for SupportedVersions
impl Send for SupportedVersions
impl Sync for SupportedVersions
impl Unpin for SupportedVersions
impl UnwindSafe for SupportedVersions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more