pub struct DraftMetadata {
pub source_surface: DraftSourceSurface,
pub source_agent: Option<String>,
pub source_project: Option<String>,
pub operator: Option<String>,
pub provenance_uri: Option<String>,
pub context_tags: Vec<String>,
pub submitted_at: SystemTime,
}Expand description
Metadata required by scope-model.md § 4 for every raw draft.
Fields§
§source_surface: DraftSourceSurfaceSurface that submitted or exposed the raw memory.
source_agent: Option<String>Agent identity, when known (claude, codex, etc.).
source_project: Option<String>Project or workspace identity, when known.
operator: Option<String>Operator identity, when known.
provenance_uri: Option<String>Stable URI/path/event id for the source material.
Optional caller-provided context tags.
submitted_at: SystemTimeWhen this draft entered Mimir’s draft surface.
Implementations§
Source§impl DraftMetadata
impl DraftMetadata
Sourcepub fn new(source_surface: DraftSourceSurface, submitted_at: SystemTime) -> Self
pub fn new(source_surface: DraftSourceSurface, submitted_at: SystemTime) -> Self
Construct metadata with only the required surface + timestamp.
Sourcepub fn from_source(source: &DraftSource, submitted_at: SystemTime) -> Self
pub fn from_source(source: &DraftSource, submitted_at: SystemTime) -> Self
Convert the older coarse DraftSource enum into v2 metadata.
Trait Implementations§
Source§impl Clone for DraftMetadata
impl Clone for DraftMetadata
Source§fn clone(&self) -> DraftMetadata
fn clone(&self) -> DraftMetadata
Returns a duplicate of the value. Read more
1.0.0 · 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 DraftMetadata
impl Debug for DraftMetadata
Source§impl PartialEq for DraftMetadata
impl PartialEq for DraftMetadata
impl Eq for DraftMetadata
impl StructuralPartialEq for DraftMetadata
Auto Trait Implementations§
impl Freeze for DraftMetadata
impl RefUnwindSafe for DraftMetadata
impl Send for DraftMetadata
impl Sync for DraftMetadata
impl Unpin for DraftMetadata
impl UnsafeUnpin for DraftMetadata
impl UnwindSafe for DraftMetadata
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.