pub struct CorpusDigest {
pub combined: String,
pub projects: Vec<ProjectDigest>,
pub issues: usize,
pub generation: u64,
}Expand description
The digest of a selected set of projects, plus what it was taken against.
Fields§
§combined: StringHash over the per-project digests, so it moves exactly when one of them does.
projects: Vec<ProjectDigest>Per-project digests, sorted by project name.
issues: usizeSum of per-project issue counts.
generation: u64Event-log generation at the time of the digest.
Implementations§
Source§impl CorpusDigest
impl CorpusDigest
Sourcepub fn render(&self) -> String
pub fn render(&self) -> String
A summary line, then one line per project.
The per-project lines are what turn “something moved” into “this moved”, which is why they are not folded into the summary.
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
The digest as a JSON object: combined hash, counts, and per-project rows.
The type’s own serialization rather than a second copy of its shape written out by hand, which is a second place for a field to be added and only one of them to get it.
Sourcepub fn digest_of(&self, project: &str) -> Option<&str>
pub fn digest_of(&self, project: &str) -> Option<&str>
The per-project digest for project, when that name is in this corpus.
Sourcepub fn project_names(&self) -> Vec<String>
pub fn project_names(&self) -> Vec<String>
Project names in this digest, in the same order as Self::projects.
Trait Implementations§
Source§impl Clone for CorpusDigest
impl Clone for CorpusDigest
Source§fn clone(&self) -> CorpusDigest
fn clone(&self) -> CorpusDigest
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 CorpusDigest
impl Debug for CorpusDigest
Source§impl<'de> Deserialize<'de> for CorpusDigest
impl<'de> Deserialize<'de> for CorpusDigest
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 CorpusDigest
Source§impl PartialEq for CorpusDigest
impl PartialEq for CorpusDigest
Source§impl Serialize for CorpusDigest
impl Serialize for CorpusDigest
impl StructuralPartialEq for CorpusDigest
Auto Trait Implementations§
impl Freeze for CorpusDigest
impl RefUnwindSafe for CorpusDigest
impl Send for CorpusDigest
impl Sync for CorpusDigest
impl Unpin for CorpusDigest
impl UnsafeUnpin for CorpusDigest
impl UnwindSafe for CorpusDigest
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more