pub struct KnowledgeCandidates {
pub total: usize,
pub on_this_branch: usize,
pub unattributed: usize,
pub branch: String,
pub candidates: Vec<KnowledgeCandidate>,
pub groups: Vec<KnowledgeGroup>,
pub cap: Option<usize>,
pub over_cap: bool,
pub findings: Vec<String>,
}Expand description
The candidates awaiting review, against the policy’s cap.
use majordomus_cli::capability::builtin::knowledge_base::KnowledgeCandidates;
let empty: KnowledgeCandidates = serde_json::from_str(
r#"{"total":0,"on_this_branch":0,"unattributed":0,"branch":"master","candidates":[],"over_cap":false}"#,
).unwrap();
assert_eq!(empty.total, 0, "an empty queue is an answer");
assert_eq!(empty.cap, None, "and a policy without the key declares no cap");Fields§
§total: usizeHow many records carry status: candidate under the candidates class.
on_this_branch: usizeHow many of them came from an episode on this checkout’s branch.
unattributed: usizeHow many name an episode this checkout knows nothing about.
branch: StringThe branch this answer is about, or DETACHED.
candidates: Vec<KnowledgeCandidate>Every candidate, in canonical order of id.
groups: Vec<KnowledgeGroup>The candidates and rejected records derived from observations, grouped by what they are about, in order of subject.
cap: Option<usize>knowledge.candidates_max_files, when the policy declares it.
over_cap: boolTrue when total exceeds cap. False when no cap is declared: nobody wrote one down.
findings: Vec<String>What a reader should know before trusting the above: a malformed record that was skipped, a cap that was exceeded, a policy that declares none. Empty is the good case.
Trait Implementations§
Source§impl Clone for KnowledgeCandidates
impl Clone for KnowledgeCandidates
Source§fn clone(&self) -> KnowledgeCandidates
fn clone(&self) -> KnowledgeCandidates
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KnowledgeCandidates
impl Debug for KnowledgeCandidates
Source§impl<'de> Deserialize<'de> for KnowledgeCandidates
impl<'de> Deserialize<'de> for KnowledgeCandidates
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>,
impl Eq for KnowledgeCandidates
Source§impl JsonSchema for KnowledgeCandidates
impl JsonSchema for KnowledgeCandidates
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for KnowledgeCandidates
impl PartialEq for KnowledgeCandidates
Source§fn eq(&self, other: &KnowledgeCandidates) -> bool
fn eq(&self, other: &KnowledgeCandidates) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for KnowledgeCandidates
impl Serialize for KnowledgeCandidates
impl StructuralPartialEq for KnowledgeCandidates
Auto Trait Implementations§
impl Freeze for KnowledgeCandidates
impl RefUnwindSafe for KnowledgeCandidates
impl Send for KnowledgeCandidates
impl Sync for KnowledgeCandidates
impl Unpin for KnowledgeCandidates
impl UnsafeUnpin for KnowledgeCandidates
impl UnwindSafe for KnowledgeCandidates
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
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
key and return true if they are equal.