Struct ruma_common::push::RoomMemberCountIs [−][src]
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
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for RoomMemberCountIsimpl Send for RoomMemberCountIsimpl Sync for RoomMemberCountIsimpl Unpin for RoomMemberCountIsimpl UnwindSafe for RoomMemberCountIsBlanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more