Skip to main content

CatalogService

Struct CatalogService 

Source
pub struct CatalogService<'a> { /* private fields */ }
Expand description

Read-only queries over a cached &[IssueRec].

Implementations§

Source§

impl<'a> CatalogService<'a>

Source

pub fn from_recs(issues: &'a [IssueRec]) -> Self

Query over an already-loaded catalog snapshot.

Source

pub fn issues_rows(&self, q: ListQuery) -> Result<Vec<IssueRow>>

List rows matching q, same filters and sort as issues_rows_from.

§Errors

Does not fail for a parsed catalog.

Source

pub fn ready(&self, project: Option<&str>) -> Result<Vec<IssueRow>>

Actionable issues: TODO or STARTED with no open blocker.

§Errors

Does not fail for a parsed catalog.

Source

pub fn detail(&self, id: &str) -> Result<IssueDetail>

One issue as a detail card, including body and logbook.

§Errors

Returns an error if id is not in the catalog.

Source

pub fn excerpt(&self, id: &str) -> Result<Excerpt>

On-disk heading range, capped and screened for secrets.

§Errors

Returns an error if id is not in the catalog, or the heading’s file cannot be read.

Source

pub fn search(&self, query: &str, limit: usize) -> Result<Vec<SearchHit>>

Case-insensitive substring scan over id, title, properties, and body.

§Errors

Does not fail for a parsed catalog.

Source

pub fn claims( &self, holder: Option<&str>, project: Option<&str>, ) -> Result<Vec<ClaimRow>>

Live claims, oldest first, optionally narrowed by holder or project.

§Errors

Does not fail for a parsed catalog.

Source

pub fn agenda(&self, days: i64, project: Option<&str>) -> Result<Vec<AgendaRow>>

Dated open work in the next days days, plus anything already overdue.

§Errors

Does not fail for a parsed catalog.

Source

pub fn tree(&self, id: &str) -> Result<TreeNode>

Parent/child subtree rooted at id.

§Errors

Returns an error if id is not in the catalog.

Source

pub fn related( &self, id: &str, depth: usize, limit: usize, ) -> Result<Vec<RelatedHit>>

Ranked related issues for id.

§Errors

Returns an error if id is not in the catalog.

Source

pub fn children(&self, id: &str) -> Result<Vec<WalkHit>>

Issues whose :PARENT: points at id.

§Errors

Returns an error if id is not in the catalog and no children exist.

Source

pub fn ancestors(&self, id: &str, depth: usize) -> Result<Vec<WalkHit>>

Transitive blocker ancestors, limited to depth hops.

§Errors

Returns an error if id is not in the catalog, or the blocker graph cannot be built.

Source

pub fn impact(&self, id: &str, depth: usize) -> Result<Vec<WalkHit>>

Transitive issues waiting on id, limited to depth hops.

§Errors

Returns an error if id is not in the catalog, or the blocker graph cannot be built.

Source

pub fn recall(&self, id: &str, depth: usize, excerpts: bool) -> Result<Recall>

The working set for id: plan, declared inputs and their deeds, and what id has produced.

§Errors

Returns an error if id is not in the catalog, or the blocker graph cannot be built.

Issues that refer to id through an edge, a parent, a discovered-from or pivoted-to property, or a body mention.

§Errors

Returns an error if id is not in the catalog and no backlinks exist.

Trait Implementations§

Source§

impl<'a> Debug for CatalogService<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for CatalogService<'a>

§

impl<'a> RefUnwindSafe for CatalogService<'a>

§

impl<'a> Send for CatalogService<'a>

§

impl<'a> Sync for CatalogService<'a>

§

impl<'a> Unpin for CatalogService<'a>

§

impl<'a> UnsafeUnpin for CatalogService<'a>

§

impl<'a> UnwindSafe for CatalogService<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.