pub struct QueryFilter {Show 13 fields
pub rooms: Vec<String>,
pub users: Vec<String>,
pub content_search: Option<String>,
pub content_regex: Option<Regex>,
pub after_seq: Option<(String, u64)>,
pub before_seq: Option<(String, u64)>,
pub after_ts: Option<DateTime<Utc>>,
pub before_ts: Option<DateTime<Utc>>,
pub mention_user: Option<String>,
pub public_only: bool,
pub target_id: Option<(String, u64)>,
pub limit: Option<usize>,
pub ascending: bool,
}Expand description
Filter criteria for the room query subcommand (née room poll).
Constructed by the CLI flag parser and evaluated per-message. The limit
and ascending fields control result set size and ordering; they are
applied externally by the caller after filtering, not inside matches.
Fields§
§rooms: Vec<String>Only include messages from these rooms. Empty = all rooms.
users: Vec<String>Only include messages sent by these users. Empty = all users.
content_search: Option<String>Only include messages whose content contains this substring (case-sensitive).
content_regex: Option<Regex>Only include messages whose content matches this pre-compiled regex.
Compiled once at construction time. Callers should validate the pattern
before building the filter (e.g. via Regex::new).
after_seq: Option<(String, u64)>Only include messages whose sequence number is strictly greater than
this value. Tuple is (room_id, seq). The constraint is skipped for
messages whose room_id differs from the filter room.
before_seq: Option<(String, u64)>Only include messages whose sequence number is strictly less than this
value. Tuple is (room_id, seq). Skipped for messages from other rooms.
after_ts: Option<DateTime<Utc>>Only include messages with a timestamp strictly after this instant.
before_ts: Option<DateTime<Utc>>Only include messages with a timestamp strictly before this instant.
mention_user: Option<String>Only include messages that @mention this username.
public_only: boolExclude DirectMessage variants (public-channel filter).
target_id: Option<(String, u64)>Only include the single message with this exact (room_id, seq).
When set, all other seq-based filters are ignored; the match is exact. DM privacy is still enforced externally by the caller.
limit: Option<usize>Maximum number of messages to return. Applied externally by the caller.
ascending: boolIf true, return messages oldest-first. If false, newest-first.
Applied externally by the caller.
Implementations§
Trait Implementations§
Source§impl Clone for QueryFilter
impl Clone for QueryFilter
Source§fn clone(&self) -> QueryFilter
fn clone(&self) -> QueryFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryFilter
impl Debug for QueryFilter
Source§impl Default for QueryFilter
impl Default for QueryFilter
Source§fn default() -> QueryFilter
fn default() -> QueryFilter
Auto Trait Implementations§
impl Freeze for QueryFilter
impl RefUnwindSafe for QueryFilter
impl Send for QueryFilter
impl Sync for QueryFilter
impl Unpin for QueryFilter
impl UnsafeUnpin for QueryFilter
impl UnwindSafe for QueryFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more