pub struct Collection<'a> {
pub noun: &'a str,
pub mode: Mode,
}Expand description
A keyed collection of forge items, such as labels or webhooks.
Fields§
§noun: &'a strNames one item in the report, as in label bug.
mode: ModeWhether live items that the configuration does not declare are deleted.
Implementations§
Source§impl Collection<'_>
impl Collection<'_>
Sourcepub fn plan<K, D, L, O, M, F, R>(
self,
declared: &BTreeMap<K, D>,
live: &[L],
report: &mut Report,
matches: M,
diff: F,
retire: R,
) -> Vec<O>
pub fn plan<K, D, L, O, M, F, R>( self, declared: &BTreeMap<K, D>, live: &[L], report: &mut Report, matches: M, diff: F, retire: R, ) -> Vec<O>
Plan the operations that make live match declared.
matches tells whether a live item has a declared key. diff compares
one declared item with its live item, if any, and may note limitations
in the report. It returns the field
comparison, which is recorded under {noun} {key}, and the operations
for it. retire names an undeclared live item and returns its delete
operation. It returns None to leave the item in place.
The operations for declared items come first, in key order. In owned mode the deletes of undeclared live items follow, in live order.
Trait Implementations§
Source§impl<'a> Clone for Collection<'a>
impl<'a> Clone for Collection<'a>
Source§fn clone(&self) -> Collection<'a>
fn clone(&self) -> Collection<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for Collection<'a>
Auto Trait Implementations§
impl<'a> Freeze for Collection<'a>
impl<'a> RefUnwindSafe for Collection<'a>
impl<'a> Send for Collection<'a>
impl<'a> Sync for Collection<'a>
impl<'a> Unpin for Collection<'a>
impl<'a> UnsafeUnpin for Collection<'a>
impl<'a> UnwindSafe for Collection<'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