pub struct Filter {
pub author: Option<String>,
pub subreddit: Option<String>,
pub before: Option<DateTime<Utc>>,
pub after: Option<DateTime<Utc>>,
pub sort_type: SortType,
pub limit: Option<i64>,
}
Expand description
Used to filter a particular query down in some way.
Fields§
§subreddit: Option<String>
§before: Option<DateTime<Utc>>
§after: Option<DateTime<Utc>>
§sort_type: SortType
§limit: Option<i64>
Implementations§
Source§impl Filter
impl Filter
pub fn new() -> Self
pub fn subreddit<S: Into<String>>(self, subreddit: S) -> Self
pub fn before(self, before: DateTime<Utc>) -> Self
pub fn after(self, after: DateTime<Utc>) -> Self
pub fn sort_type(self, sort_type: SortType) -> Self
pub fn limit(self, limit: i64) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
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