pub struct UncommittedReport {
pub schema: String,
pub observed_at: String,
pub threshold: Threshold,
pub worktrees: Vec<UncommittedWorktree>,
pub tallies: UncommittedTallies,
pub findings: Vec<String>,
}Expand description
Every linked work tree holding uncommitted work, with what holds it: the answer of
worktree.uncommitted on every surface, and what doctor renders.
use majordomus_cli::worktree::uncommitted::UNCOMMITTED_SCHEMA;
use majordomus_cli::worktree::{Threshold, UncommittedReport, WorktreeService};
let dir = tempfile::tempdir().unwrap();
let init = std::process::Command::new("git")
.args(["init", "-q"])
.current_dir(dir.path())
.status()
.unwrap();
assert!(init.success());
// a repository with no linked work tree, and a policy that declares no threshold
let threshold = Threshold::resolve(None, None).unwrap();
let report: UncommittedReport =
WorktreeService::open(dir.path()).unwrap().uncommitted(&threshold).unwrap();
assert_eq!(report.schema, UNCOMMITTED_SCHEMA);
assert!(report.worktrees.is_empty());
assert_eq!(report.tallies.measured, 0);
assert_eq!(report.findings.len(), 1, "a missing threshold is said, not assumed");Fields§
§schema: String§observed_at: StringWhen the reading was taken, RFC 3339 in UTC.
threshold: ThresholdThe threshold it was judged against.
worktrees: Vec<UncommittedWorktree>Every linked work tree with uncommitted work, abandoned first, then oldest first.
tallies: UncommittedTalliesThe counts.
findings: Vec<String>What could not be read or judged, in words.
Trait Implementations§
Source§impl Clone for UncommittedReport
impl Clone for UncommittedReport
Source§fn clone(&self) -> UncommittedReport
fn clone(&self) -> UncommittedReport
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 UncommittedReport
impl Debug for UncommittedReport
Source§impl<'de> Deserialize<'de> for UncommittedReport
impl<'de> Deserialize<'de> for UncommittedReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for UncommittedReport
Source§impl JsonSchema for UncommittedReport
impl JsonSchema for UncommittedReport
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for UncommittedReport
impl PartialEq for UncommittedReport
Source§fn eq(&self, other: &UncommittedReport) -> bool
fn eq(&self, other: &UncommittedReport) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UncommittedReport
impl Serialize for UncommittedReport
impl StructuralPartialEq for UncommittedReport
Auto Trait Implementations§
impl Freeze for UncommittedReport
impl RefUnwindSafe for UncommittedReport
impl Send for UncommittedReport
impl Sync for UncommittedReport
impl Unpin for UncommittedReport
impl UnsafeUnpin for UncommittedReport
impl UnwindSafe for UncommittedReport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.