Skip to main content

CoreBackend

Struct CoreBackend 

Source
pub struct CoreBackend { /* private fields */ }
Expand description

One-shot parse of the tracker, refreshed after mutations and wait.

Implementations§

Source§

impl CoreBackend

Source

pub fn open(layout: Layout, identity: impl Into<String>) -> Result<Self, Error>

Parse the vault once and stamp identity on later mutations.

§Errors

Returns an error if a project file cannot be read or parsed.

Trait Implementations§

Source§

impl BoardBackend for CoreBackend

Source§

fn layout(&self) -> &Layout

Vault this backend reads and writes.
Source§

fn generation(&self) -> u64

File-watcher generation.
Source§

fn revision(&self) -> u64

Serve catalog revision. Core is always 0.
Source§

fn live(&self) -> BackendKind

Which store this backend is.
Source§

fn identity(&self) -> &str

Claim and update identity (core: constructor; control: serve initialize).
Source§

fn list(&self, q: ListQuery) -> Result<ListPage, Error>

Filtered issue list for the List pane. Read more
Source§

fn ready(&self, project: Option<&str>) -> Result<ListPage, Error>

Actionable ready queue, optionally scoped to project. Read more
Source§

fn get(&self, id: &str) -> Result<IssueDetail, Error>

Full metadata for one issue. Read more
Source§

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

On-disk heading range, capped and screened for secrets. Read more
Source§

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

Title and body search hits, capped at limit. Read more
Source§

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

Open claims, optionally filtered by holder and project. Read more
Source§

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

Deadlines and scheduled dates inside days. Read more
Source§

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

Parent and child tree rooted at id. Read more
Source§

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

Related issues by graph walk and text overlap. Read more
Source§

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

The working set for id: plan, declared inputs and their deeds. Read more
Source§

fn deed(&self, id: &str, add: &[String]) -> Result<MutResult, Error>

Cite deed accessions on id. Read more
Source§

fn projects(&self) -> Result<Vec<String>, Error>

Project names under the layout prefix. Read more
Source§

fn claim(&self, id: &str, force: bool) -> Result<MutResult, Error>

Claim id as Self::identity. force takes over another holder. Read more
Source§

fn note(&self, id: &str, text: &str) -> Result<MutResult, Error>

Append a one-line logbook note. Read more
Source§

fn update(&self, req: UpdateReq) -> Result<MutResult, Error>

Change state, priority, or blocker edges. Read more
Source§

fn create(&self, project: &str, title: &str) -> Result<MutResult, Error>

Create a TODO in project with title. Read more
Source§

fn open(&self, id: &str) -> Result<IssueDetail, Error>

Same metadata as Self::get; control also marks the issue opened. Read more
Source§

fn wait(&self, last: u64, timeout_ms: u64) -> Result<u64, Error>

Core: wait on the file generation. Control: wait for vault/changed. Read more
Source§

fn refresh(&self) -> Result<(), Error>

Re-read the files. Core uses this after an out-of-band write. Control is a no-op; serve sees the file event. Read more
Source§

fn last_since_revision(&self) -> Option<Option<u64>>

Last since_revision sent on list/ready. None means the field was omitted. Default is “not recorded”.
Source§

fn invalidate_since(&self)

Drop since_revision on the next list/ready. Serve unchanged is catalog-wide, so a pane or project change must fetch a full page.
Source§

impl Debug for CoreBackend

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.