pub struct ProjectState {
pub timestamp: String,
pub config_hash: String,
pub files: BTreeMap<PathBuf, FileState>,
pub metadata: ProjectMetadata,
}Expand description
Complete state representation of a project at a point in time
Fields§
§timestamp: StringTimestamp when this state was captured
config_hash: StringHash of the configuration used to generate this state
files: BTreeMap<PathBuf, FileState>Map of file paths to their state information
metadata: ProjectMetadataProject metadata
Implementations§
Source§impl ProjectState
impl ProjectState
Sourcepub fn from_files(
files: &[DirEntry],
base_path: &Path,
config: &Config,
line_numbers: bool,
) -> Result<Self>
pub fn from_files( files: &[DirEntry], base_path: &Path, config: &Config, line_numbers: bool, ) -> Result<Self>
Create a new project state from collected files
Sourcepub fn compare_with(&self, previous: &ProjectState) -> StateComparison
pub fn compare_with(&self, previous: &ProjectState) -> StateComparison
Compare this state with a previous state
Sourcepub fn has_changes(&self, other: &ProjectState) -> bool
pub fn has_changes(&self, other: &ProjectState) -> bool
Check if this state has any content changes compared to another
Trait Implementations§
Source§impl Clone for ProjectState
impl Clone for ProjectState
Source§fn clone(&self) -> ProjectState
fn clone(&self) -> ProjectState
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 ProjectState
impl Debug for ProjectState
Source§impl<'de> Deserialize<'de> for ProjectState
impl<'de> Deserialize<'de> for ProjectState
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
Auto Trait Implementations§
impl Freeze for ProjectState
impl RefUnwindSafe for ProjectState
impl Send for ProjectState
impl Sync for ProjectState
impl Unpin for ProjectState
impl UnwindSafe for ProjectState
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more