pub struct DuplicateGroup {
pub id: String,
pub text_hash: String,
pub text: Option<String>,
pub count: usize,
pub last_ts: i64,
pub projects: Vec<String>,
pub action: Action,
}Expand description
One set of byte-identical prompts.
Fields§
§id: StringShort, stable handle for --draft. Derived from text_hash, so it is
the same on every run and on every machine with the same prompt.
text_hash: String§text: Option<String>Absent when general.index_prompt_text = false: the hash still groups,
but there is no text to show.
count: usize§last_ts: i64Most recent occurrence, epoch ms.
projects: Vec<String>Projects the prompt was sent from, sorted; empty if none were recorded.
action: ActionImplementations§
Source§impl DuplicateGroup
impl DuplicateGroup
Sourcepub fn preview(&self) -> String
pub fn preview(&self) -> String
One line of the prompt, whitespace-collapsed and truncated, or an explicit statement that the text was never stored.
Sourcepub fn projects_label(&self) -> String
pub fn projects_label(&self) -> String
Projects for a table cell: a few names, then a count. A prompt repeated
across two dozen repos would otherwise be one unreadable row. --json
keeps the full list.
Trait Implementations§
Source§impl Clone for DuplicateGroup
impl Clone for DuplicateGroup
Source§fn clone(&self) -> DuplicateGroup
fn clone(&self) -> DuplicateGroup
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 DuplicateGroup
impl Debug for DuplicateGroup
impl Eq for DuplicateGroup
Source§impl PartialEq for DuplicateGroup
impl PartialEq for DuplicateGroup
impl StructuralPartialEq for DuplicateGroup
Auto Trait Implementations§
impl Freeze for DuplicateGroup
impl RefUnwindSafe for DuplicateGroup
impl Send for DuplicateGroup
impl Sync for DuplicateGroup
impl Unpin for DuplicateGroup
impl UnsafeUnpin for DuplicateGroup
impl UnwindSafe for DuplicateGroup
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.