pub struct GroupTrack<'a> { /* private fields */ }Expand description
A variant of GroupMut that tracks changes to the group, such as deletions and moves, and updates the location changed time when the group is moved.
Implementations§
Source§impl GroupTrack<'_>
impl GroupTrack<'_>
Sourcepub fn move_to(&mut self, new_parent_id: GroupId) -> Result<(), MoveGroupError>
pub fn move_to(&mut self, new_parent_id: GroupId) -> Result<(), MoveGroupError>
Move this group to a new parent group, updating the location changed time.
Sourcepub fn remove(self) -> Result<(), CannotDeleteRootError>
pub fn remove(self) -> Result<(), CannotDeleteRootError>
Deletes this group and all its child groups and entries from the database, adding them to the deleted entries and groups sets.
Sourcepub fn edit(&mut self, f: impl FnOnce(&mut GroupTrack<'_>)) -> &mut Self
pub fn edit(&mut self, f: impl FnOnce(&mut GroupTrack<'_>)) -> &mut Self
Convenience method to edit the group in a closure, updating the last modification time.
Methods from Deref<Target = Group>§
Trait Implementations§
Source§impl Deref for GroupTrack<'_>
impl Deref for GroupTrack<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for GroupTrack<'a>
impl<'a> Freeze for GroupTrack<'a>
impl<'a> RefUnwindSafe for GroupTrack<'a>
impl<'a> Send for GroupTrack<'a>
impl<'a> Sync for GroupTrack<'a>
impl<'a> Unpin for GroupTrack<'a>
impl<'a> UnsafeUnpin for GroupTrack<'a>
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