pub struct AnnotationRevision {
pub revision_id: String,
pub kind: AnnotationKind,
pub content: String,
pub tags: Vec<String>,
pub attribution: String,
pub created_at: i64,
pub source_hash: Option<ContentHash>,
pub created_at_state: Option<ChangeId>,
}Expand description
A single revision of a logical annotation.
Fields§
§revision_id: String§kind: AnnotationKind§content: String§attribution: String§created_at: i64§source_hash: Option<ContentHash>BLAKE3 hash of the source bytes at the annotated scope when created. For File scope: hash of entire file blob. For Symbol/Lines: hash of the relevant byte range.
created_at_state: Option<ChangeId>The State this revision was created against. Enables retrieving the exact source as it was at annotation time.
Implementations§
Source§impl AnnotationRevision
impl AnnotationRevision
pub fn validate(&self) -> Result<(), ContextError>
Trait Implementations§
Source§impl Clone for AnnotationRevision
impl Clone for AnnotationRevision
Source§fn clone(&self) -> AnnotationRevision
fn clone(&self) -> AnnotationRevision
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 AnnotationRevision
impl Debug for AnnotationRevision
Source§impl<'de> Deserialize<'de> for AnnotationRevision
impl<'de> Deserialize<'de> for AnnotationRevision
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
Source§impl PartialEq for AnnotationRevision
impl PartialEq for AnnotationRevision
Source§fn eq(&self, other: &AnnotationRevision) -> bool
fn eq(&self, other: &AnnotationRevision) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AnnotationRevision
impl Serialize for AnnotationRevision
impl Eq for AnnotationRevision
impl StructuralPartialEq for AnnotationRevision
Auto Trait Implementations§
impl Freeze for AnnotationRevision
impl RefUnwindSafe for AnnotationRevision
impl Send for AnnotationRevision
impl Sync for AnnotationRevision
impl Unpin for AnnotationRevision
impl UnsafeUnpin for AnnotationRevision
impl UnwindSafe for AnnotationRevision
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