pub struct ProjectJsonVersionFile;Expand description
Version file engine for project.json.
Uses regex matching to support both strict JSON and JSONC with comments.
Trait Implementations§
Source§impl Clone for ProjectJsonVersionFile
impl Clone for ProjectJsonVersionFile
Source§fn clone(&self) -> ProjectJsonVersionFile
fn clone(&self) -> ProjectJsonVersionFile
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 ProjectJsonVersionFile
impl Debug for ProjectJsonVersionFile
Source§impl VersionFile for ProjectJsonVersionFile
impl VersionFile for ProjectJsonVersionFile
Source§fn detect(&self, content: &str) -> bool
fn detect(&self, content: &str) -> bool
Check if
content contains a version field this engine handles.Source§fn read_version(&self, content: &str) -> Option<String>
fn read_version(&self, content: &str) -> Option<String>
Extract the current version string from file content.
Source§fn write_version(
&self,
content: &str,
new_version: &str,
) -> Result<String, VersionFileError>
fn write_version( &self, content: &str, new_version: &str, ) -> Result<String, VersionFileError>
Return updated file content with
new_version replacing the old value.impl Copy for ProjectJsonVersionFile
Auto Trait Implementations§
impl Freeze for ProjectJsonVersionFile
impl RefUnwindSafe for ProjectJsonVersionFile
impl Send for ProjectJsonVersionFile
impl Sync for ProjectJsonVersionFile
impl Unpin for ProjectJsonVersionFile
impl UnsafeUnpin for ProjectJsonVersionFile
impl UnwindSafe for ProjectJsonVersionFile
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