Struct ruma_client_api::r0::capabilities::Capabilities [−][src]
#[non_exhaustive]pub struct Capabilities { pub change_password: ChangePasswordCapability, pub room_versions: RoomVersionsCapability, // some fields omitted }
Contains information about all the capabilities that the server supports.
Fields (Non-exhaustive)
Struct {{ .. }} syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.change_password: ChangePasswordCapabilityCapability to indicate if the user can change their password.
room_versions: RoomVersionsCapabilityThe room versions the server supports.
Implementations
impl Capabilities[src]
pub fn new() -> Self[src]
Creates empty Capabilities.
pub fn get(&self, capability: &str) -> Option<Cow<'_, JsonValue>>[src]
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.
pub fn set(&mut self, capability: &str, value: JsonValue) -> Result<()>[src]
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>;[src]
Notable traits for CapabilitiesIter<'a>
impl<'a> Iterator for CapabilitiesIter<'a> type Item = CapabilityRef<'a>;Returns an iterator over the capabilities.
Trait Implementations
impl Clone for Capabilities[src]
fn clone(&self) -> Capabilities[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for Capabilities[src]
impl Default for Capabilities[src]
fn default() -> Capabilities[src]
impl<'de> Deserialize<'de> for Capabilities[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl From<Capabilities> for Response[src]
fn from(capabilities: Capabilities) -> Self[src]
impl<'a> IntoIterator for &'a Capabilities[src]
type Item = CapabilityRef<'a>
The type of the elements being iterated over.
type IntoIter = CapabilitiesIter<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl Serialize for Capabilities[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,