Skip to main content

RemoteServices

Struct RemoteServices 

Source
pub struct RemoteServices { /* private fields */ }

Implementations§

Source§

impl RemoteServices

Source

pub fn load_snapshot( &self, snapshot: FileSnapshot, document: DocumentID, recovery: Option<&RecoveryStore>, ) -> Result<(LoadedDocument, LoadBudget), CoreError>

Source

pub fn save_prepared( &self, recovery: &RecoveryStore, prepared: PreparedSave, ) -> OperationReceipt

Source§

impl RemoteServices

Source§

impl RemoteServices

Source

pub fn observe_owned<'a>( &self, worktree: WorktreeIdentity, aliases: impl Iterator<Item = &'a FileRef> + Clone, on_event: impl FnMut(ObservationEvent) -> Result<(), CoreError>, ) -> Result<OwnedObservation, CoreError>

Freeze the complete aliases under the caller’s registration barrier. Events remain provisional until this method validates the complete codec and authenticated end seal.

Source

pub fn existing_original( &self, original: &GitMutationRequest, ) -> Result<Option<OperationReceipt>, CoreError>

Worker-only existing lookup. This cannot promote a missing original into new work.

Source

pub fn prepare_worktree<'a>( &self, original: &GitMutationRequest, observation: [u8; 16], alias_digest: [u8; 32], approvals: impl Iterator<Item = &'a GitSaveApproval> + Clone, ) -> Result<WorktreePreparation, CoreError>

Existing receipt wins before approval iteration. Preserve the original ID on every error.

Source

pub fn execute_worktree<'a>( &self, original: GitMutationRequest, plan: [u8; 16], alias_digest: [u8; 32], approvals: impl Iterator<Item = &'a GitSaveApproval> + Clone, ) -> Result<OperationReceipt, CoreError>

Source

pub fn cancel_worktree_plan(&self, plan: [u8; 16]) -> Result<(), CoreError>

Source

pub fn release_observation( &self, observation: [u8; 16], ) -> Result<(), CoreError>

Source§

impl RemoteServices

Source

pub fn connect( socket: UnixStream, target: TargetIdentity, lease: WorkspaceLease, spool_directory: PathBuf, ) -> Result<Self, CoreError>

The route owner supplies an authenticated byte transport and verified target, never a display hostname.

Source

pub fn register_workspace( &self, lease: WorkspaceLease, ) -> Result<Self, CoreError>

Worker-only registration; all views share the existing wire worker and spool pool.

Source

pub fn observe_owner( &self, owner: WorkspaceLease, ) -> Result<LeaseObservation, CoreError>

Worker-only, read-only observation of an exact prior owner.

Source

pub fn lease(&self) -> &WorkspaceLease

Source

pub fn target(&self) -> &TargetIdentity

Source

pub fn validate_environment_ready(&self) -> Result<(), CoreError>

Source

pub fn negotiated_capabilities(&self) -> &[String]

Source

pub fn release_workspace( &self, intent: LeaseReleaseIntent, ) -> Result<(), CoreError>

Revokes this view’s new-work authority; other registered views remain connected.

Source

pub fn close_connection(&self) -> RemoteShutdown ⓘ

Physical-route owner only. Drop the SSH channel separately and await both shutdowns off the owner thread.

Source

pub fn set_authentication( &self, ssh_auth_sock: Option<TargetPath>, ) -> Result<(), CoreError>

Source

pub fn runtime(&self) -> RuntimeGeneration

Source

pub fn connection_state(&self) -> ConnectionState

Source

pub fn contains_document( &self, worktree: WorktreeIdentity, file: FileRef, ) -> Result<bool, CoreError>

Source

pub fn path_version(&self, file: FileRef) -> Result<FileVersion, CoreError>

Trait Implementations§

Source§

impl Clone for RemoteServices

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl FileService for RemoteServices

Source§

impl GitService for RemoteServices

Source§

impl OperationService for RemoteServices

Source§

impl SearchService for RemoteServices

Source§

impl TerminalService for RemoteServices

Source§

impl WorkspaceLeaseService for RemoteServices

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.