pub struct Host<T> { /* private fields */ }Expand description
The remote-host side of a run, over whichever store holds its state.
It is both interfaces at once: a RemoteHost a journey can call directly, and
the Hosting factory a run is handed. A host taken from the factory shares
this one’s state, so what a publication did is read back through the value the
journey created.
Implementations§
Source§impl Host<MemoryStore<HostState>>
impl Host<MemoryStore<HostState>>
Source§impl Host<FileStore<HostState>>
impl Host<FileStore<HostState>>
Sourcepub fn create(path: impl Into<PathBuf>) -> Result<Self>
pub fn create(path: impl Into<PathBuf>) -> Result<Self>
A host keeping its state at path: whatever is already there, or nothing
opened against it.
Attaching rather than replacing, so a second host over the same path answers about the change requests the first one opened.
Trait Implementations§
Source§impl<T: Store<HostState>> RemoteHost for Host<T>
impl<T: Store<HostState>> RemoteHost for Host<T>
Source§fn authenticated_user(&self) -> Result<String>
fn authenticated_user(&self) -> Result<String>
Who the host believes is calling.
Source§fn open_change(&self, req: ChangeSpec) -> Result<ChangeRequest>
fn open_change(&self, req: ChangeSpec) -> Result<ChangeRequest>
Open a change request.
Source§fn find_changes(&self, head: &str, base: &str) -> Result<Vec<ChangeRequest>>
fn find_changes(&self, head: &str, base: &str) -> Result<Vec<ChangeRequest>>
Every open change request from
head into base.Source§fn change_checks(&self, cr: &ChangeRequest) -> Result<ChangeChecks>
fn change_checks(&self, cr: &ChangeRequest) -> Result<ChangeChecks>
The checks the host is reporting on a change request, and which of its
sources that answer was read from.
Source§fn check_log(&self, cr: &ChangeRequest, check: &Check) -> Result<ArtifactId>
fn check_log(&self, cr: &ChangeRequest, check: &Check) -> Result<ArtifactId>
Store one check’s log as an artifact and return its id.
Source§fn merge(&self, cr: &ChangeRequest, policy: MergePolicy) -> Result<MergeOutcome>
fn merge(&self, cr: &ChangeRequest, policy: MergePolicy) -> Result<MergeOutcome>
Merge a change request under a policy.
Auto Trait Implementations§
impl<T> Freeze for Host<T>where
T: Freeze,
impl<T> RefUnwindSafe for Host<T>where
T: RefUnwindSafe,
impl<T> Send for Host<T>where
T: Send,
impl<T> Sync for Host<T>where
T: Sync,
impl<T> Unpin for Host<T>where
T: Unpin,
impl<T> UnsafeUnpin for Host<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Host<T>where
T: UnwindSafe,
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