Struct ruma::api::client::r0::capabilities::Capabilities [−][src]
pub struct Capabilities { pub change_password: ChangePasswordCapability, pub room_versions: RoomVersionsCapability, // some fields omitted }
api
and (crate features client-api
or client-api-c
or client-api-s
) only.Expand description
Contains information about all the capabilities that the server supports.
Fields
change_password: ChangePasswordCapability
Capability to indicate if the user can change their password.
room_versions: RoomVersionsCapability
The room versions the server supports.
Implementations
Creates empty Capabilities
.
Returns the value of the given capability.
Prefer to use the public fields of Capabilities
where possible; this method is meant to be
used for unsupported capabilities only.
Sets a capability to the given value.
Prefer to use the public fields of Capabilities
where possible; this method is meant to be
used for unsupported capabilities only and does not allow setting arbitrary data for
supported ones.
pub fn iter(&self) -> CapabilitiesIter<'_>ⓘNotable traits for CapabilitiesIter<'a>
impl<'a> Iterator for CapabilitiesIter<'a> type Item = CapabilityRef<'a>;
pub fn iter(&self) -> CapabilitiesIter<'_>ⓘNotable traits for CapabilitiesIter<'a>
impl<'a> Iterator for CapabilitiesIter<'a> type Item = CapabilityRef<'a>;
Returns an iterator over the capabilities.
Trait Implementations
Returns the “default value” for a type. Read more
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Capabilities, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Capabilities, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
type Item = CapabilityRef<'a>
type Item = CapabilityRef<'a>
The type of the elements being iterated over.
type IntoIter = CapabilitiesIter<'a>
type IntoIter = CapabilitiesIter<'a>
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnwindSafe for Capabilities
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
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