pub enum MaintscriptAction {
DropEntry {
file: PathBuf,
entry: String,
},
}Expand description
Edits to a maintscript file.
Each line in a maintscript file is an independent dpkg-maintscript-helper
invocation. We address entries by their exact text, mirroring how
MakefileAction::ReplaceRecipe addresses recipe lines.
Variants§
DropEntry
Drop the first entry whose trimmed line text equals entry.
Comments immediately preceding the dropped line are also removed.
If the file ends up empty (no entries remain), it is removed
entirely. Each DropEntry consumes one matching line — to remove
N copies of the same entry, emit N actions.
Trait Implementations§
Source§impl Clone for MaintscriptAction
impl Clone for MaintscriptAction
Source§fn clone(&self) -> MaintscriptAction
fn clone(&self) -> MaintscriptAction
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 moreSource§impl Debug for MaintscriptAction
impl Debug for MaintscriptAction
Source§impl<'de> Deserialize<'de> for MaintscriptAction
impl<'de> Deserialize<'de> for MaintscriptAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MaintscriptAction
impl PartialEq for MaintscriptAction
Source§fn eq(&self, other: &MaintscriptAction) -> bool
fn eq(&self, other: &MaintscriptAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MaintscriptAction
impl Serialize for MaintscriptAction
impl Eq for MaintscriptAction
impl StructuralPartialEq for MaintscriptAction
Auto Trait Implementations§
impl Freeze for MaintscriptAction
impl RefUnwindSafe for MaintscriptAction
impl Send for MaintscriptAction
impl Sync for MaintscriptAction
impl Unpin for MaintscriptAction
impl UnsafeUnpin for MaintscriptAction
impl UnwindSafe for MaintscriptAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.