Struct ruma_common::push::RoomMemberCountIs
source · 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§fn eq(&self, other: &RoomMemberCountIs) -> bool
fn eq(&self, other: &RoomMemberCountIs) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.