pub struct ControlBackend { /* private fields */ }Expand description
JSON-RPC client after a matching initialize.
Implementations§
Source§impl ControlBackend
impl ControlBackend
Sourcepub fn connect(
path: &Path,
layout: &Layout,
agent: &str,
) -> Result<Self, ControlAttachError>
pub fn connect( path: &Path, layout: &Layout, agent: &str, ) -> Result<Self, ControlAttachError>
Connect, initialize with a required agent, and refuse a root/prefix
mismatch so mutations never hit the wrong vault.
§Errors
Returns an error if the socket cannot be reached, initialize fails, or
the serve root/prefix does not match layout.
Sourcepub fn connect_as(
path: &Path,
layout: &Layout,
agent: &str,
client: &str,
) -> Result<Self, ControlAttachError>
pub fn connect_as( path: &Path, layout: &Layout, agent: &str, client: &str, ) -> Result<Self, ControlAttachError>
Same as Self::connect with an explicit initialize.client name.
§Errors
Returns an error if the socket cannot be reached, initialize fails, or
the serve root/prefix does not match layout.
Trait Implementations§
Source§impl BoardBackend for ControlBackend
impl BoardBackend for ControlBackend
Source§fn wait(&self, last: u64, timeout_ms: u64) -> Result<u64, Error>
fn wait(&self, last: u64, timeout_ms: u64) -> Result<u64, Error>
§Panics
Panics if the control client lock is poisoned.
Source§fn last_since_revision(&self) -> Option<Option<u64>>
fn last_since_revision(&self) -> Option<Option<u64>>
§Panics
Panics if the since lock is poisoned.
Source§fn invalidate_since(&self)
fn invalidate_since(&self)
§Panics
Panics if the query lock is poisoned.
Source§fn generation(&self) -> u64
fn generation(&self) -> u64
File-watcher generation.
Source§fn live(&self) -> BackendKind
fn live(&self) -> BackendKind
Which store this backend is.
Source§fn identity(&self) -> &str
fn identity(&self) -> &str
Claim and update identity (core: constructor; control: serve
initialize).Source§fn list(&self, q: ListQuery) -> Result<ListPage, Error>
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>
fn ready(&self, project: Option<&str>) -> Result<ListPage, Error>
Actionable ready queue, optionally scoped to
project. Read moreSource§fn excerpt(&self, id: &str) -> Result<Excerpt, Error>
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>
fn search(&self, query: &str, limit: usize) -> Result<Vec<SearchHit>, Error>
Title and body search hits, capped at
limit. Read moreSource§fn claims(
&self,
holder: Option<&str>,
project: Option<&str>,
) -> Result<Vec<ClaimRow>, Error>
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>
fn agenda( &self, days: i64, project: Option<&str>, ) -> Result<Vec<AgendaRow>, Error>
Deadlines and scheduled dates inside
days. Read moreSource§fn tree(&self, id: &str) -> Result<TreeNode, Error>
fn tree(&self, id: &str) -> Result<TreeNode, Error>
Parent and child tree rooted at
id. Read moreRelated issues by graph walk and text overlap. Read more
Source§fn recall(&self, id: &str, depth: usize) -> Result<Recall, Error>
fn recall(&self, id: &str, depth: usize) -> Result<Recall, Error>
The working set for
id: plan, declared inputs and their deeds. Read moreSource§fn deed(&self, id: &str, add: &[String]) -> Result<MutResult, Error>
fn deed(&self, id: &str, add: &[String]) -> Result<MutResult, Error>
Cite deed accessions on
id. Read moreSource§fn projects(&self) -> Result<Vec<String>, Error>
fn projects(&self) -> Result<Vec<String>, Error>
Project names under the layout prefix. Read more
Source§fn note(&self, id: &str, text: &str) -> Result<MutResult, Error>
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>
fn update(&self, req: UpdateReq) -> Result<MutResult, Error>
Change state, priority, or blocker edges. Read more
Auto Trait Implementations§
impl !Freeze for ControlBackend
impl RefUnwindSafe for ControlBackend
impl Send for ControlBackend
impl Sync for ControlBackend
impl Unpin for ControlBackend
impl UnsafeUnpin for ControlBackend
impl UnwindSafe for ControlBackend
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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