[]Struct matrix_sdk_common::push::RoomMemberCountIs

pub struct RoomMemberCountIs {
    pub prefix: ComparisonOperator,
    pub count: UInt,
}

A decimal integer optionally prefixed by one of ==, <, >, >= or <=.

A prefix of < matches rooms where the member count is strictly less than the given number and so forth. If no prefix is present, this parameter defaults to ==.

Can be constructed from a number or a range:

use js_int::uint;
use ruma_common::push::RoomMemberCountIs;

// equivalent to `is: "3"` or `is: "==3"`
let exact = RoomMemberCountIs::from(uint!(3));

// equivalent to `is: ">=3"`
let greater_or_equal = RoomMemberCountIs::from(uint!(3)..);

// equivalent to `is: "<3"`
let less = RoomMemberCountIs::from(..uint!(3));

// equivalent to `is: "<=3"`
let less_or_equal = RoomMemberCountIs::from(..=uint!(3));

// An exclusive range can be constructed with `RoomMemberCountIs::gt`:
// (equivalent to `is: ">3"`)
let greater = RoomMemberCountIs::gt(uint!(3));

Fields

prefix: ComparisonOperator

One of ==, <, >, >=, <=, or no prefix.

count: UInt

The number of people in the room.

Implementations

impl RoomMemberCountIs

pub fn gt(count: UInt) -> RoomMemberCountIs

Creates an instance of RoomMemberCount equivalent to <X, where X is the specified member count.

Trait Implementations

impl Clone for RoomMemberCountIs

impl Copy for RoomMemberCountIs

impl Debug for RoomMemberCountIs

impl<'de> Deserialize<'de> for RoomMemberCountIs

impl Display for RoomMemberCountIs

impl Eq for RoomMemberCountIs

impl From<RangeFrom<UInt>> for RoomMemberCountIs

impl From<RangeTo<UInt>> for RoomMemberCountIs

impl From<RangeToInclusive<UInt>> for RoomMemberCountIs

impl From<UInt> for RoomMemberCountIs

impl FromStr for RoomMemberCountIs

type Err = ParseIntError

The associated error which can be returned from parsing.

impl PartialEq<RoomMemberCountIs> for RoomMemberCountIs

impl RangeBounds<UInt> for RoomMemberCountIs

impl Serialize for RoomMemberCountIs

impl StructuralEq for RoomMemberCountIs

impl StructuralPartialEq for RoomMemberCountIs

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsyncTraitDeps for T where
    T: Send + Sync + Debug
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,