pub struct RecoverOrphansResult {
pub older_than_seconds: u64,
pub check: bool,
pub strays: Vec<Stray>,
pub removable: usize,
pub removed: usize,
pub unmeasurable: usize,
}Expand description
What one sweep found and what it did about it.
The counts are derived from strays rather than accumulated beside it, so a reader can
check the report against itself and a surface that renders the list cannot disagree with
the surface that renders the total.
use majordomus_cli::capability::builtin::recover::RecoverOrphansResult;
let plan: RecoverOrphansResult = serde_json::from_str(r#"{
"older_than_seconds": 43200, "check": true, "strays": [],
"removable": 0, "removed": 0, "unmeasurable": 0
}"#).unwrap();
// a check never removes anything, whatever it found
assert_eq!(plan.removed, 0);
assert!(plan.check);Fields§
§older_than_seconds: u64The threshold this sweep measured against, echoed back so that a refusal or a verdict names the value the caller actually got rather than the one it believes it sent.
check: boolWhether this was a check. true means nothing was written.
strays: Vec<Stray>Every stray found, in path order.
removable: usizeHow many of them this call would remove, or did.
removed: usizeHow many it actually removed. Always 0 on a check.
unmeasurable: usizeHow many candidates could not be measured and were therefore left alone.
Trait Implementations§
Source§impl Clone for RecoverOrphansResult
impl Clone for RecoverOrphansResult
Source§fn clone(&self) -> RecoverOrphansResult
fn clone(&self) -> RecoverOrphansResult
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 RecoverOrphansResult
impl Debug for RecoverOrphansResult
Source§impl<'de> Deserialize<'de> for RecoverOrphansResult
impl<'de> Deserialize<'de> for RecoverOrphansResult
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 RecoverOrphansResult
Source§impl JsonSchema for RecoverOrphansResult
impl JsonSchema for RecoverOrphansResult
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 RecoverOrphansResult
impl PartialEq for RecoverOrphansResult
Source§fn eq(&self, other: &RecoverOrphansResult) -> bool
fn eq(&self, other: &RecoverOrphansResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RecoverOrphansResult
impl Serialize for RecoverOrphansResult
impl StructuralPartialEq for RecoverOrphansResult
Auto Trait Implementations§
impl Freeze for RecoverOrphansResult
impl RefUnwindSafe for RecoverOrphansResult
impl Send for RecoverOrphansResult
impl Sync for RecoverOrphansResult
impl Unpin for RecoverOrphansResult
impl UnsafeUnpin for RecoverOrphansResult
impl UnwindSafe for RecoverOrphansResult
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.