pub struct RoomMemberCountIs {
    pub prefix: ComparisonOperator,
    pub count: UInt,
}Expand description
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: ComparisonOperatorOne of ==, <, >, >=, <=, or no prefix.
count: UIntThe number of people in the room.
Implementations§
Source§impl RoomMemberCountIs
 
impl RoomMemberCountIs
Sourcepub fn gt(count: UInt) -> RoomMemberCountIs
 Available on crate feature events only.
pub fn gt(count: UInt) -> RoomMemberCountIs
events only.Creates an instance of RoomMemberCount equivalent to <X,
where X is the specified member count.
Trait Implementations§
Source§impl Clone for RoomMemberCountIs
 
impl Clone for RoomMemberCountIs
Source§fn clone(&self) -> RoomMemberCountIs
 
fn clone(&self) -> RoomMemberCountIs
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 moreSource§impl Debug for RoomMemberCountIs
 
impl Debug for RoomMemberCountIs
Source§impl<'de> Deserialize<'de> for RoomMemberCountIs
 
impl<'de> Deserialize<'de> for RoomMemberCountIs
Source§fn deserialize<D>(
    deserializer: D,
) -> Result<RoomMemberCountIs, <D as Deserializer<'de>>::Error>where
    D: Deserializer<'de>,
 
fn deserialize<D>(
    deserializer: D,
) -> Result<RoomMemberCountIs, <D as Deserializer<'de>>::Error>where
    D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RoomMemberCountIs
 
impl Display for RoomMemberCountIs
Source§impl From<RangeToInclusive<UInt>> for RoomMemberCountIs
 
impl From<RangeToInclusive<UInt>> for RoomMemberCountIs
Source§fn from(x: RangeToInclusive<UInt>) -> RoomMemberCountIs
 
fn from(x: RangeToInclusive<UInt>) -> RoomMemberCountIs
Converts to this type from the input type.
Source§impl From<UInt> for RoomMemberCountIs
 
impl From<UInt> for RoomMemberCountIs
Source§fn from(x: UInt) -> RoomMemberCountIs
 
fn from(x: UInt) -> RoomMemberCountIs
Converts to this type from the input type.
Source§impl FromStr for RoomMemberCountIs
 
impl FromStr for RoomMemberCountIs
Source§type Err = ParseIntError
 
type Err = ParseIntError
The associated error which can be returned from parsing.
Source§fn from_str(
    s: &str,
) -> Result<RoomMemberCountIs, <RoomMemberCountIs as FromStr>::Err>
 
fn from_str( s: &str, ) -> Result<RoomMemberCountIs, <RoomMemberCountIs as FromStr>::Err>
Parses a string 
s to return a value of this type. Read moreSource§impl PartialEq for RoomMemberCountIs
 
impl PartialEq for RoomMemberCountIs
Source§impl RangeBounds<UInt> for RoomMemberCountIs
 
impl RangeBounds<UInt> for RoomMemberCountIs
Source§impl Serialize for RoomMemberCountIs
 
impl Serialize for RoomMemberCountIs
Source§fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
 
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
impl Copy for RoomMemberCountIs
impl Eq for RoomMemberCountIs
impl StructuralPartialEq for RoomMemberCountIs
Auto Trait Implementations§
impl Freeze for RoomMemberCountIs
impl RefUnwindSafe for RoomMemberCountIs
impl Send for RoomMemberCountIs
impl Sync for RoomMemberCountIs
impl Unpin for RoomMemberCountIs
impl UnwindSafe for RoomMemberCountIs
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,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.