pub struct AnnotationMetadata {
pub id: String,
pub target: AnnotationTarget,
pub kind: AnnotationKind,
pub status: AnnotationStatus,
pub body: String,
pub author: Option<String>,
pub created: Option<String>,
pub labels: Vec<String>,
pub proposed_change: Option<ProposedChange>,
}Expand description
Parsed annotation metadata object.
Fields§
§id: StringStable annotation id.
target: AnnotationTargetAnnotation target.
kind: AnnotationKindAnnotation kind.
status: AnnotationStatusReview lifecycle status.
body: StringHuman/agent-readable annotation body.
Optional author identifier.
created: Option<String>Optional creation timestamp string.
labels: Vec<String>Optional version-control-friendly labels.
proposed_change: Option<ProposedChange>Optional proposed textual change.
Implementations§
Source§impl AnnotationMetadata
impl AnnotationMetadata
Sourcepub fn from_package(package: &McdPackage, path: &str) -> Result<Self>
pub fn from_package(package: &McdPackage, path: &str) -> Result<Self>
Parse annotation metadata from a package entry.
Sourcepub fn validate(
&self,
expected_id: &str,
manifest: &Manifest,
package: &McdPackage,
document: &McdDocument,
source: &str,
) -> Result<()>
pub fn validate( &self, expected_id: &str, manifest: &Manifest, package: &McdPackage, document: &McdDocument, source: &str, ) -> Result<()>
Validate annotation metadata, target references, and proposed changes.
Trait Implementations§
Source§impl Clone for AnnotationMetadata
impl Clone for AnnotationMetadata
Source§fn clone(&self) -> AnnotationMetadata
fn clone(&self) -> AnnotationMetadata
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 AnnotationMetadata
impl Debug for AnnotationMetadata
Source§impl<'de> Deserialize<'de> for AnnotationMetadata
impl<'de> Deserialize<'de> for AnnotationMetadata
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 AnnotationMetadata
impl PartialEq for AnnotationMetadata
Source§fn eq(&self, other: &AnnotationMetadata) -> bool
fn eq(&self, other: &AnnotationMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AnnotationMetadata
impl Serialize for AnnotationMetadata
impl Eq for AnnotationMetadata
impl StructuralPartialEq for AnnotationMetadata
Auto Trait Implementations§
impl Freeze for AnnotationMetadata
impl RefUnwindSafe for AnnotationMetadata
impl Send for AnnotationMetadata
impl Sync for AnnotationMetadata
impl Unpin for AnnotationMetadata
impl UnsafeUnpin for AnnotationMetadata
impl UnwindSafe for AnnotationMetadata
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.