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: ComparisonOperator
One of ==
, <
, >
, >=
, <=
, or no prefix.
count: UInt
The number of people in the room.
Implementations§
Trait Implementations§
Source§impl Clone for RoomMemberCountIs
impl Clone for RoomMemberCountIs
Source§fn clone(&self) -> RoomMemberCountIs
fn clone(&self) -> RoomMemberCountIs
Returns a copy 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<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::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>) -> Self
fn from(x: RangeToInclusive<UInt>) -> Self
Converts to this type from the input type.
Source§impl From<UInt> for RoomMemberCountIs
impl From<UInt> for RoomMemberCountIs
Source§impl FromStr for RoomMemberCountIs
impl FromStr for RoomMemberCountIs
Source§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
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.