pub struct Fragment {
path: Utf8PathBuf,
pr_number: u64,
toml: DocumentMut,
changed: bool,
deleted: bool,
}
Fields§
§path: Utf8PathBuf
§pr_number: u64
§toml: DocumentMut
§changed: bool
§deleted: bool
Implementations§
Source§impl Fragment
impl Fragment
pub fn new(pr_number: u64, root: &Utf8Path) -> Result<Self>
pub fn changed(&self) -> bool
pub fn deleted(&self) -> bool
pub fn path(&self) -> &Utf8Path
pub fn has_package(&self, package: &str) -> bool
pub fn items(&self) -> Result<BTreeMap<String, Vec<PackageChangeLog>>>
pub fn add_log(&mut self, package: &str, log: &PackageChangeLog)
pub fn remove_package(&mut self, package: &str) -> Result<Vec<PackageChangeLog>>
pub fn save(&mut self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fragment
impl RefUnwindSafe for Fragment
impl Send for Fragment
impl Sync for Fragment
impl Unpin for Fragment
impl UnwindSafe for Fragment
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