pub struct ThreadQuery {
pub offset: usize,
pub limit: usize,
pub resource_id: Option<String>,
pub parent_filter: ThreadParentFilter,
pub id_prefix: Option<String>,
}Expand description
Pagination/filter query for listing threads.
Fields§
§offset: usizeNumber of items to skip after filtering.
limit: usizeMaximum number of items to return.
resource_id: Option<String>Filter by external resource grouping.
parent_filter: ThreadParentFilterFilter by parent/root lineage.
id_prefix: Option<String>Backend-internal scope filter: keep only thread IDs that start with this
prefix. Pushed down so a scoped listing never scans the full thread set
of a shared backend (ADR-0042 scope boundary). Server routes must not
expose this as a user-controlled HTTP filter; scoped wrappers inject it
from trusted ScopeContext. None means no backend scope filter.
Implementations§
Source§impl ThreadQuery
impl ThreadQuery
Sourcepub fn has_filters(&self) -> bool
pub fn has_filters(&self) -> bool
Return true when the query carries any non-pagination filter.
Sourcepub fn normalized(&self) -> ThreadQuery
pub fn normalized(&self) -> ThreadQuery
Return a copy with normalized lineage filters.
Sourcepub fn encode_cursor(&self, offset: usize) -> String
pub fn encode_cursor(&self, offset: usize) -> String
Encode an opaque cursor for continuing this exact query.
Sourcepub fn decode_cursor(&self, cursor: &str) -> Result<usize, String>
pub fn decode_cursor(&self, cursor: &str) -> Result<usize, String>
Decode a cursor and verify it belongs to this exact query shape.
Sourcepub fn matches_thread(&self, thread: &Thread) -> bool
pub fn matches_thread(&self, thread: &Thread) -> bool
Return true when a thread passes the query filters.
Trait Implementations§
Source§impl Clone for ThreadQuery
impl Clone for ThreadQuery
Source§fn clone(&self) -> ThreadQuery
fn clone(&self) -> ThreadQuery
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 ThreadQuery
impl Debug for ThreadQuery
Source§impl Default for ThreadQuery
impl Default for ThreadQuery
Source§fn default() -> ThreadQuery
fn default() -> ThreadQuery
Source§impl<'de> Deserialize<'de> for ThreadQuery
impl<'de> Deserialize<'de> for ThreadQuery
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThreadQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThreadQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ThreadQuery
Source§impl PartialEq for ThreadQuery
impl PartialEq for ThreadQuery
Source§fn eq(&self, other: &ThreadQuery) -> bool
fn eq(&self, other: &ThreadQuery) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ThreadQuery
impl Serialize for ThreadQuery
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ThreadQuery
Auto Trait Implementations§
impl Freeze for ThreadQuery
impl RefUnwindSafe for ThreadQuery
impl Send for ThreadQuery
impl Sync for ThreadQuery
impl Unpin for ThreadQuery
impl UnsafeUnpin for ThreadQuery
impl UnwindSafe for ThreadQuery
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.