Skip to main content

ControlBackend

Struct ControlBackend 

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

JSON-RPC client after a matching initialize.

Implementations§

Source§

impl ControlBackend

Source

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.

Source

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

Source§

fn layout(&self) -> &Layout

Source§

fn generation(&self) -> u64

Source§

fn revision(&self) -> u64

Source§

fn live(&self) -> BackendKind

Source§

fn identity(&self) -> &str

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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>>

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§

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

Re-read the files. Core uses this after an out-of-band write such as ops::create. Control is a no-op; serve sees the file event.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.