pub struct PlainVersionFile;Expand description
Version file engine for plain VERSION files.
Expects the file to contain nothing but a version string (optionally followed by a trailing newline).
Trait Implementations§
Source§impl Clone for PlainVersionFile
impl Clone for PlainVersionFile
Source§fn clone(&self) -> PlainVersionFile
fn clone(&self) -> PlainVersionFile
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 PlainVersionFile
impl Debug for PlainVersionFile
Source§impl VersionFile for PlainVersionFile
impl VersionFile for PlainVersionFile
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 PlainVersionFile
Auto Trait Implementations§
impl Freeze for PlainVersionFile
impl RefUnwindSafe for PlainVersionFile
impl Send for PlainVersionFile
impl Sync for PlainVersionFile
impl Unpin for PlainVersionFile
impl UnsafeUnpin for PlainVersionFile
impl UnwindSafe for PlainVersionFile
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