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 ready_for_review(&self, cr: &ChangeRequest) -> Result<()>
fn ready_for_review(&self, cr: &ChangeRequest) -> Result<()>
Take the change request out of its draft state.
The call itself is what is recorded, rather than a flag that would read the same whether it was made once or twice: what a journey asks of this is whether a second publication over an already-lifted change asked the host for anything, and only the calls can answer that. A change already open for review is already what this asks for, so it succeeds — the caller wanted it ready, and it is.
Source§fn authenticated_user(&self) -> Result<String>
fn authenticated_user(&self) -> Result<String>
Source§fn open_change(&self, req: ChangeSpec) -> Result<ChangeRequest>
fn open_change(&self, req: ChangeSpec) -> Result<ChangeRequest>
Source§fn find_changes(&self, head: &str, base: &str) -> Result<Vec<ChangeRequest>>
fn find_changes(&self, head: &str, base: &str) -> Result<Vec<ChangeRequest>>
head into base.