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.
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.
Trait Implementations§
Source§impl BoardBackend for ControlBackend
impl BoardBackend for ControlBackend
fn layout(&self) -> &Layout
fn generation(&self) -> u64
fn revision(&self) -> u64
fn live(&self) -> BackendKind
fn identity(&self) -> &str
fn list(&self, q: ListQuery) -> Result<ListPage, Error>
fn ready(&self, project: Option<&str>) -> Result<ListPage, Error>
fn get(&self, id: &str) -> Result<IssueDetail, Error>
fn excerpt(&self, id: &str) -> Result<Excerpt, Error>
fn search(&self, query: &str, limit: usize) -> Result<Vec<SearchHit>, Error>
fn claims( &self, holder: Option<&str>, project: Option<&str>, ) -> Result<Vec<ClaimRow>, Error>
fn agenda( &self, days: i64, project: Option<&str>, ) -> Result<Vec<AgendaRow>, Error>
fn tree(&self, id: &str) -> Result<TreeNode, Error>
fn projects(&self) -> Result<Vec<String>, Error>
fn claim(&self, id: &str, force: bool) -> Result<MutResult, Error>
fn note(&self, id: &str, text: &str) -> Result<MutResult, Error>
fn update(&self, req: UpdateReq) -> Result<MutResult, Error>
fn open(&self, id: &str) -> Result<IssueDetail, Error>
Source§fn wait(&self, last: u64, timeout_ms: u64) -> Result<u64, Error>
fn wait(&self, last: u64, timeout_ms: u64) -> Result<u64, Error>
Core: wait on the file generation. Control: wait for
vault/changed.Source§fn last_since_revision(&self) -> Option<Option<u64>>
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)
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.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