[−]Struct matrix_sdk_common::push::RoomMemberCountIs
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
pub fn clone(&self) -> RoomMemberCountIs
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for RoomMemberCountIs
impl Debug for RoomMemberCountIs
impl<'de> Deserialize<'de> for RoomMemberCountIs
pub fn deserialize<D>(
deserializer: D
) -> Result<RoomMemberCountIs, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
deserializer: D
) -> Result<RoomMemberCountIs, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl Display for RoomMemberCountIs
impl Eq for RoomMemberCountIs
impl From<RangeFrom<UInt>> for RoomMemberCountIs
pub fn from(x: RangeFrom<UInt>) -> RoomMemberCountIs
impl From<RangeTo<UInt>> for RoomMemberCountIs
pub fn from(x: RangeTo<UInt>) -> RoomMemberCountIs
impl From<RangeToInclusive<UInt>> for RoomMemberCountIs
pub fn from(x: RangeToInclusive<UInt>) -> RoomMemberCountIs
impl From<UInt> for RoomMemberCountIs
pub fn from(x: UInt) -> RoomMemberCountIs
impl FromStr for RoomMemberCountIs
type Err = ParseIntError
The associated error which can be returned from parsing.
pub fn from_str(
s: &str
) -> Result<RoomMemberCountIs, <RoomMemberCountIs as FromStr>::Err>
s: &str
) -> Result<RoomMemberCountIs, <RoomMemberCountIs as FromStr>::Err>
impl PartialEq<RoomMemberCountIs> for RoomMemberCountIs
pub fn eq(&self, other: &RoomMemberCountIs) -> bool
pub fn ne(&self, other: &RoomMemberCountIs) -> bool
impl RangeBounds<UInt> for RoomMemberCountIs
pub fn start_bound(&self) -> Bound<&UInt>
pub fn end_bound(&self) -> Bound<&UInt>
pub fn assert_len(self, len: usize) -> Range<usize> where
Self: RangeBounds<usize>,
[src]
Self: RangeBounds<usize>,
pub fn contains<U>(&self, item: &U) -> bool where
T: PartialOrd<U>,
U: PartialOrd<T> + ?Sized,
1.35.0[src]
T: PartialOrd<U>,
U: PartialOrd<T> + ?Sized,
impl Serialize for RoomMemberCountIs
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl StructuralEq for RoomMemberCountIs
impl StructuralPartialEq for RoomMemberCountIs
Auto Trait Implementations
impl RefUnwindSafe for RoomMemberCountIs
[src]
impl Send for RoomMemberCountIs
[src]
impl Sync for RoomMemberCountIs
[src]
impl Unpin for RoomMemberCountIs
[src]
impl UnwindSafe for RoomMemberCountIs
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsyncTraitDeps for T where
T: Send + Sync + Debug,
[src]
T: Send + Sync + Debug,
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, 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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,