pub struct ListDrawersQuery {
pub room: Option<String>,
pub tag: Option<String>,
pub limit: Option<usize>,
pub offset: Option<usize>,
pub sort: Option<String>,
}Expand description
GET /api/v1/palaces/{id}/drawers query — service-facing version.
Why: the TUI activity panel (#184) needs paged access to a palace’s
drawers in newest-first order. Adding offset and sort to the existing
query struct keeps the surface compatible (both fields default to absent)
while letting the panel walk through arbitrarily many drawers.
What: optional room / tag filters, a limit (default 50 in the
handler), an offset for pagination, and a sort selector — importance
(the legacy default, descending) or created_desc (newest first).
Test: list_drawers_creates_desc_paginates in service::tests.
Fields§
§room: Option<String>§tag: Option<String>§limit: Option<usize>§offset: Option<usize>Number of drawers to skip before returning results. Combined with
limit this paginates the result set. Defaults to 0.
sort: Option<String>Sort selector: "importance" (default — importance descending,
preserving legacy behaviour) or "created_desc" (creation date
descending, newest first — used by the TUI activity panel).
Trait Implementations§
Source§impl Clone for ListDrawersQuery
impl Clone for ListDrawersQuery
Source§fn clone(&self) -> ListDrawersQuery
fn clone(&self) -> ListDrawersQuery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ListDrawersQuery
impl Debug for ListDrawersQuery
Source§impl Default for ListDrawersQuery
impl Default for ListDrawersQuery
Source§fn default() -> ListDrawersQuery
fn default() -> ListDrawersQuery
Source§impl<'de> Deserialize<'de> for ListDrawersQuery
impl<'de> Deserialize<'de> for ListDrawersQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ListDrawersQuery
impl RefUnwindSafe for ListDrawersQuery
impl Send for ListDrawersQuery
impl Sync for ListDrawersQuery
impl Unpin for ListDrawersQuery
impl UnsafeUnpin for ListDrawersQuery
impl UnwindSafe for ListDrawersQuery
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