pub struct CheckoutFacts {
pub id: Option<String>,
pub root: Option<PathBuf>,
}Expand description
What the projected sessions say about the checkout they work in. Computed once at start — branch and head are refreshed when a board session changes, never on a heartbeat, so liveness never rescans the repository.
Both fields are optional because a runtime need not be in a checkout at all, and a runtime that is says so once: the root is kept rather than the branch, so that a session announced after a checkout moved carries where it is now and not where it was when the process started.
use majordomus_cli::mesh::cooperation::CheckoutFacts;
let unknown = CheckoutFacts::default();
assert!(unknown.root.is_none(), "a runtime outside a checkout claims no branch");
let here = CheckoutFacts { id: Some("c0ffee".into()), root: Some(".".into()) };
assert_eq!(here.id.as_deref(), Some("c0ffee"));Fields§
§id: Option<String>The checkout id (a digest).
root: Option<PathBuf>The checkout root, for reading the branch and the head when a session changes.
Trait Implementations§
Source§impl Clone for CheckoutFacts
impl Clone for CheckoutFacts
Source§fn clone(&self) -> CheckoutFacts
fn clone(&self) -> CheckoutFacts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CheckoutFacts
impl Debug for CheckoutFacts
Source§impl Default for CheckoutFacts
impl Default for CheckoutFacts
Source§fn default() -> CheckoutFacts
fn default() -> CheckoutFacts
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CheckoutFacts
impl RefUnwindSafe for CheckoutFacts
impl Send for CheckoutFacts
impl Sync for CheckoutFacts
impl Unpin for CheckoutFacts
impl UnsafeUnpin for CheckoutFacts
impl UnwindSafe for CheckoutFacts
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