pub struct Ratchet {
pub schema_version: u32,
pub source_sets: RatchetSourceSets,
pub dependencies: BTreeMap<String, RatchetEntry>,
}Fields§
§schema_version: u32§source_sets: RatchetSourceSets§dependencies: BTreeMap<String, RatchetEntry>Implementations§
Source§impl Ratchet
impl Ratchet
pub fn exists( repository_root: &Path, relative_path: &str, ) -> Result<bool, RatchetFileError>
pub fn load_optional( repository_root: &Path, relative_path: &str, ) -> Result<Option<Ratchet>, RatchetFileError>
pub fn load_for_update( repository_root: &Path, relative_path: &str, reset: bool, ) -> Result<LoadedForUpdate<Ratchet>, RatchetFileError>
pub fn parse(text: &str, path_label: &str) -> Result<Ratchet, RatchetFileError>
pub fn write_atomic( &self, repository_root: &Path, relative_path: &str, ) -> Result<PathBuf, RatchetFileError>
pub fn entry( &self, source_set: Option<SourceSet>, metric: &str, ) -> Option<RatchetEntry>
pub fn total_entries(&self) -> usize
pub fn check( &self, measured: &[MeasuredRatchetMetric], ) -> Result<Vec<RatchetViolation>, Vec<RatchetVersionMismatch>>
pub fn update( existing: Option<&Ratchet>, measured: &[MeasuredRatchetMetric], reset: bool, path_label: &str, ) -> Result<(Ratchet, RatchetUpdateSummary), Vec<RatchetViolation>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ratchet
impl<'de> Deserialize<'de> for Ratchet
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
impl StructuralPartialEq for Ratchet
Auto Trait Implementations§
impl Forget for Ratchet
impl Freeze for Ratchetwhere
*const LeafNode<String, RatchetEntry> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, RatchetEntry)>>: Freeze,
impl Move for Ratchet
impl RefUnwindSafe for Ratchet
impl Send for Ratchetwhere
NodeRef<Owned, String, RatchetEntry, LeafOrInternal>: Send,
BoxRaw<(String, RatchetEntry)>: Send,
impl Sync for Ratchetwhere
NodeRef<Owned, String, RatchetEntry, LeafOrInternal>: Sync,
BoxRaw<(String, RatchetEntry)>: Sync,
impl Unpin for Ratchet
impl UnsafeUnpin for Ratchetwhere
*const LeafNode<String, RatchetEntry> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, RatchetEntry)>>: UnsafeUnpin,
impl UnwindSafe for Ratchet
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