pub struct ContentFilter {
pub creator_id: Option<Uuid>,
pub category: Option<ContentCategory>,
pub status: Option<ContentStatus>,
pub min_price: Option<u64>,
pub max_price: Option<u64>,
pub search: Option<String>,
pub tags: Option<Vec<String>>,
pub order_by: Option<ContentOrderBy>,
pub order_desc: bool,
}Expand description
Filter for content queries.
Fields§
§creator_id: Option<Uuid>Filter by creator ID.
category: Option<ContentCategory>Filter by category.
status: Option<ContentStatus>Filter by status.
min_price: Option<u64>Filter by minimum price.
max_price: Option<u64>Filter by maximum price.
search: Option<String>Search in title/description.
Filter by tags (any match).
order_by: Option<ContentOrderBy>Order by field.
order_desc: boolOrder direction.
Implementations§
Source§impl ContentFilter
impl ContentFilter
Sourcepub fn category(self, category: ContentCategory) -> Self
pub fn category(self, category: ContentCategory) -> Self
Filter by category.
Sourcepub fn status(self, status: ContentStatus) -> Self
pub fn status(self, status: ContentStatus) -> Self
Filter by status.
Filter by tags.
Sourcepub fn order_by(self, field: ContentOrderBy, desc: bool) -> Self
pub fn order_by(self, field: ContentOrderBy, desc: bool) -> Self
Order by field.
Trait Implementations§
Source§impl Clone for ContentFilter
impl Clone for ContentFilter
Source§fn clone(&self) -> ContentFilter
fn clone(&self) -> ContentFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContentFilter
impl Debug for ContentFilter
Source§impl Default for ContentFilter
impl Default for ContentFilter
Source§fn default() -> ContentFilter
fn default() -> ContentFilter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContentFilter
impl RefUnwindSafe for ContentFilter
impl Send for ContentFilter
impl Sync for ContentFilter
impl Unpin for ContentFilter
impl UnwindSafe for ContentFilter
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