pub struct CatalogueQuery {Show 15 fields
pub canonical_route: Option<CanonicalActionRoute>,
pub provider: Option<String>,
pub app_id: Option<String>,
pub view_resource: Option<ViewResourceQuery>,
pub parent_resource: Option<String>,
pub needle: String,
pub resource_name: Option<String>,
pub target: Option<ActionAddress>,
pub action: Option<String>,
pub revision: Option<String>,
pub cursor: Vec<u8>,
pub max_results: u32,
pub limits: Option<CatalogueLimits>,
pub by_resource: bool,
pub max_resources: Option<u32>,
}Expand description
One bounded request for catalogue rows. Every field narrows; the empty query lists the first page of everything offered.
Fields§
§canonical_route: Option<CanonicalActionRoute>Provider-only lookup of one exact route’s owner. Cannot accompany a provider, cursor, target, view lookup, or row filter.
provider: Option<String>Only rows from this provider (a token a previous page issued).
app_id: Option<String>Only rows published by this application. It narrows the rows a provider builds and pages — before the page bound — while the providers the caller may browse are listed either way.
view_resource: Option<ViewResourceQuery>Read-only view discovery, separate from the document action catalogue.
parent_resource: Option<String>Only the direct children of this resource; None is the top level
for a listing, and every level for a query that names words
(Self::needle): a search finds a row wherever in the tree it
stands.
needle: StringOnly rows whose labels, ids or parameters contain this text (case-insensitive).
resource_name: Option<String>Only resources this names: their kind, or their label ignoring ASCII
case, at the top level or, with Self::parent_resource, among that
resource’s direct children. A provider answers it whole, wherever the
resource would fall in a paged listing; it takes no cursor or needle.
A provider from before parents were named answers with top-level rows,
whose parent says so.
target: Option<ActionAddress>Only this exact action, re-resolved against the provider now: the check to make immediately before invoking a row from an older page.
action: Option<String>Only the action with this id, wherever the provider publishes it: the
lookup of an action named by its app alone. An agent hears here of one
only the person at the publishing device takes
(crate::Availability::shown_here), which no listing offers it.
revision: Option<String>The revision cursor (or target) was obtained at. A provider refuses a
cursor from another revision as stale rather than skipping rows.
cursor: Vec<u8>Opaque continuation from the previous page; empty starts over.
max_results: u32Upper bound on rows, clamped to MAX_CATALOGUE_PAGE. With no
provider named, zero asks only for CataloguePage::providers.
limits: Option<CatalogueLimits>Optional upper bounds on the work a provider spends answering.
by_resource: boolThe rows each resource offers sent as one (CatalogueRow::offered,
compact), and a page up to MAX_BY_RESOURCE_PAGE rows long:
what a listing of resources asks, which shows each resource’s actions
by their ids. Cursors still count the rows each stands for.
max_resources: Option<u32>Upper bound on the resources a page holds rows of, as well as on its rows: the page ends after the last row of that many resources. What a caller listing a number of resources asks, so that a provider builds those and not as many rows as it guessed they offer.
Implementations§
Source§impl CatalogueQuery
impl CatalogueQuery
Sourcepub fn resolve(target: &RemoteActionTarget, revision: impl Into<String>) -> Self
pub fn resolve(target: &RemoteActionTarget, revision: impl Into<String>) -> Self
A query that re-resolves exactly target at revision.
Sourcepub fn resource_bound(&self) -> Option<usize>
pub fn resource_bound(&self) -> Option<usize>
The resources a page may hold rows of (Self::max_resources), at
least one: a page always moves the listing on.
Source§impl CatalogueQuery
impl CatalogueQuery
Sourcepub fn admits(&self, row: &CatalogueRow) -> bool
pub fn admits(&self, row: &CatalogueRow) -> bool
Whether row is one this query lists: under the parent asked for,
of the app, view, words, name and action it names. An exact action
is found wherever it stands, since its address names it alone, and so
is a row whose words hold a needle asked for with no parent named: a
search ranges over the whole tree, where a browse names one place.
Trait Implementations§
Source§impl Clone for CatalogueQuery
impl Clone for CatalogueQuery
Source§impl Debug for CatalogueQuery
impl Debug for CatalogueQuery
Source§impl Default for CatalogueQuery
impl Default for CatalogueQuery
Source§impl<'de> Deserialize<'de> for CatalogueQuery
impl<'de> Deserialize<'de> for CatalogueQuery
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>,
impl Eq for CatalogueQuery
Source§impl PartialEq for CatalogueQuery
impl PartialEq for CatalogueQuery
Source§impl Serialize for CatalogueQuery
impl Serialize for CatalogueQuery
impl StructuralPartialEq for CatalogueQuery
Auto Trait Implementations§
impl Forget for CatalogueQuery
impl Freeze for CatalogueQuery
impl Move for CatalogueQuery
impl RefUnwindSafe for CatalogueQuery
impl Send for CatalogueQuery
impl Sync for CatalogueQuery
impl Unpin for CatalogueQuery
impl UnsafeUnpin for CatalogueQuery
impl UnwindSafe for CatalogueQuery
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<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