pub struct FileProvenance {
pub format_version: u8,
pub file_blob: ContentHash,
pub line_count: u32,
pub origins: Vec<Origin>,
pub origin_sets: Vec<OriginSet>,
pub spans: Vec<LineSpan>,
}Fields§
§format_version: u8§file_blob: ContentHash§line_count: u32§origins: Vec<Origin>§origin_sets: Vec<OriginSet>§spans: Vec<LineSpan>Implementations§
Source§impl FileProvenance
impl FileProvenance
pub const FORMAT_VERSION: u8 = 1
pub fn new( file_blob: ContentHash, line_count: u32, spans: Vec<LineSpan>, origins: Vec<Origin>, origin_sets: Vec<OriginSet>, ) -> Self
pub fn validate(&self) -> Result<(), ProvenanceError>
pub fn line_origin_set_indexes(&self) -> Result<Vec<u32>, ProvenanceError>
Trait Implementations§
Source§impl Clone for FileProvenance
impl Clone for FileProvenance
Source§fn clone(&self) -> FileProvenance
fn clone(&self) -> FileProvenance
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 FileProvenance
impl Debug for FileProvenance
Source§impl<'de> Deserialize<'de> for FileProvenance
impl<'de> Deserialize<'de> for FileProvenance
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 FileProvenance
impl PartialEq for FileProvenance
Source§fn eq(&self, other: &FileProvenance) -> bool
fn eq(&self, other: &FileProvenance) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FileProvenance
impl Serialize for FileProvenance
impl Eq for FileProvenance
impl StructuralPartialEq for FileProvenance
Auto Trait Implementations§
impl Freeze for FileProvenance
impl RefUnwindSafe for FileProvenance
impl Send for FileProvenance
impl Sync for FileProvenance
impl Unpin for FileProvenance
impl UnsafeUnpin for FileProvenance
impl UnwindSafe for FileProvenance
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