Struct ruma::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: ComparisonOperatorOne of ==, <, >, >=, <=, or no prefix.
count: UIntThe number of people in the room.
Implementations
sourceimpl RoomMemberCountIs
 
impl RoomMemberCountIs
sourcepub fn gt(count: UInt) -> RoomMemberCountIs
 
pub fn gt(count: UInt) -> RoomMemberCountIs
Creates an instance of RoomMemberCount equivalent to <X,
where X is the specified member count.
Trait Implementations
sourceimpl Clone for RoomMemberCountIs
 
impl Clone for RoomMemberCountIs
sourcefn clone(&self) -> RoomMemberCountIs
 
fn clone(&self) -> RoomMemberCountIs
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for RoomMemberCountIs
 
impl Debug for RoomMemberCountIs
sourceimpl<'de> Deserialize<'de> for RoomMemberCountIs
 
impl<'de> Deserialize<'de> for RoomMemberCountIs
sourcefn 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
sourceimpl Display for RoomMemberCountIs
 
impl Display for RoomMemberCountIs
sourceimpl From<RangeFrom<UInt>> for RoomMemberCountIs
 
impl From<RangeFrom<UInt>> for RoomMemberCountIs
sourcefn from(x: RangeFrom<UInt>) -> RoomMemberCountIs
 
fn from(x: RangeFrom<UInt>) -> RoomMemberCountIs
Converts to this type from the input type.
sourceimpl From<RangeTo<UInt>> for RoomMemberCountIs
 
impl From<RangeTo<UInt>> for RoomMemberCountIs
sourcefn from(x: RangeTo<UInt>) -> RoomMemberCountIs
 
fn from(x: RangeTo<UInt>) -> RoomMemberCountIs
Converts to this type from the input type.
sourceimpl From<RangeToInclusive<UInt>> for RoomMemberCountIs
 
impl From<RangeToInclusive<UInt>> for RoomMemberCountIs
sourcefn from(x: RangeToInclusive<UInt>) -> RoomMemberCountIs
 
fn from(x: RangeToInclusive<UInt>) -> RoomMemberCountIs
Converts to this type from the input type.
sourceimpl From<UInt> for RoomMemberCountIs
 
impl From<UInt> for RoomMemberCountIs
sourcefn from(x: UInt) -> RoomMemberCountIs
 
fn from(x: UInt) -> RoomMemberCountIs
Converts to this type from the input type.
sourceimpl FromStr for RoomMemberCountIs
 
impl FromStr for RoomMemberCountIs
type Err = ParseIntError
type Err = ParseIntError
The associated error which can be returned from parsing.
sourcefn 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 more
sourceimpl PartialEq<RoomMemberCountIs> for RoomMemberCountIs
 
impl PartialEq<RoomMemberCountIs> for RoomMemberCountIs
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &RoomMemberCountIs) -> bool
 
fn ne(&self, other: &RoomMemberCountIs) -> bool
This method tests for !=.
sourceimpl RangeBounds<UInt> for RoomMemberCountIs
 
impl RangeBounds<UInt> for RoomMemberCountIs
sourcefn start_bound(&self) -> Bound<&UInt>
 
fn start_bound(&self) -> Bound<&UInt>
Start index bound. Read more
1.35.0 · sourcefn contains<U>(&self, item: &U) -> bool where
    T: PartialOrd<U>,
    U: PartialOrd<T> + ?Sized, 
 
fn contains<U>(&self, item: &U) -> bool where
    T: PartialOrd<U>,
    U: PartialOrd<T> + ?Sized, 
Returns true if item is contained in the range. Read more
sourceimpl Serialize for RoomMemberCountIs
 
impl Serialize for RoomMemberCountIs
sourcefn 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 StructuralEq for RoomMemberCountIs
impl StructuralPartialEq for RoomMemberCountIs
Auto Trait Implementations
impl RefUnwindSafe for RoomMemberCountIs
impl Send for RoomMemberCountIs
impl Sync for RoomMemberCountIs
impl Unpin for RoomMemberCountIs
impl UnwindSafe for RoomMemberCountIs
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized, 
 
impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized, 
sourcefn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> Instrument for T
 
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
 
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
 
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
    S: Into<Dispatch>, 
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
 
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
