pub struct UncommittedTallies {
pub measured: usize,
pub uncommitted: usize,
pub held: usize,
pub recent: usize,
pub abandoned: usize,
}Expand description
The counts of an UncommittedReport: how many linked work trees were read, how many
hold uncommitted work, and how those split into held, recent and abandoned. The three
standings always add up to uncommitted; doctor reads abandoned to decide whether it
has anything to warn about.
use majordomus_cli::worktree::UncommittedTallies;
let wire = serde_json::json!(
{"measured": 4, "uncommitted": 3, "held": 1, "recent": 1, "abandoned": 1}
);
let t: UncommittedTallies = serde_json::from_value(wire.clone()).unwrap();
assert_eq!(t.held + t.recent + t.abandoned, t.uncommitted);
assert_eq!(serde_json::to_value(&t).unwrap(), wire, "the shape doctor's jq reads");
assert_eq!(UncommittedTallies::default().abandoned, 0, "nothing read, nothing abandoned");Fields§
§measured: usizeLinked work trees whose status was read.
uncommitted: usizeOf those, the ones holding uncommitted work: every entry of the listing.
held: usizeHeld by a task, an episode or a process.
recent: usizeHeld by nothing, younger than the threshold.
abandoned: usizeHeld by nothing, older than the threshold.
Trait Implementations§
Source§impl Clone for UncommittedTallies
impl Clone for UncommittedTallies
Source§fn clone(&self) -> UncommittedTallies
fn clone(&self) -> UncommittedTallies
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 UncommittedTallies
impl Debug for UncommittedTallies
Source§impl Default for UncommittedTallies
impl Default for UncommittedTallies
Source§fn default() -> UncommittedTallies
fn default() -> UncommittedTallies
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UncommittedTallies
impl<'de> Deserialize<'de> for UncommittedTallies
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 UncommittedTallies
Source§impl JsonSchema for UncommittedTallies
impl JsonSchema for UncommittedTallies
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 UncommittedTallies
impl PartialEq for UncommittedTallies
Source§fn eq(&self, other: &UncommittedTallies) -> bool
fn eq(&self, other: &UncommittedTallies) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UncommittedTallies
impl Serialize for UncommittedTallies
impl StructuralPartialEq for UncommittedTallies
Auto Trait Implementations§
impl Freeze for UncommittedTallies
impl RefUnwindSafe for UncommittedTallies
impl Send for UncommittedTallies
impl Sync for UncommittedTallies
impl Unpin for UncommittedTallies
impl UnsafeUnpin for UncommittedTallies
impl UnwindSafe for UncommittedTallies
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.