pub struct Change {
pub unique_id: UniqueId,
pub versioning: Versioning,
pub summary: String,
}
Expand description
Represents a single change which is applicable to any number of packages.
Fields§
§unique_id: UniqueId
Something to uniquely identify a change.
This is the name of the file (without the .md
extension) which defines this changeset.
versioning: Versioning
Describes how a changeset affects the relevant packages.
summary: String
The details of the change which will be written to a Changelog file
Implementations§
Source§impl Change
impl Change
Sourcepub fn write_to_directory<T: AsRef<Path>>(&self, path: T) -> Result<PathBuf>
pub fn write_to_directory<T: AsRef<Path>>(&self, path: T) -> Result<PathBuf>
Create a markdown file in the provided directory with the contents of this Change
.
The name of the created file will be the Change::unique_id
with the .md
extension—
that path is returned.
§Errors
If the file cannot be written, an std::io::Error
is returned. This may happen if the
directory does not exist.
Sourcepub fn from_file_name_and_content(
file_name: &str,
content: &str,
) -> Result<Self, LoadingError>
pub fn from_file_name_and_content( file_name: &str, content: &str, ) -> Result<Self, LoadingError>
Trait Implementations§
Source§impl FromIterator<Change> for ChangeSet
impl FromIterator<Change> for ChangeSet
impl Eq for Change
impl StructuralPartialEq for Change
Auto Trait Implementations§
impl Freeze for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnwindSafe for Change
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