diff --git a/src/id3/v2/tag.rs b/src/id3/v2/tag.rs index d402ae6b..9e3bb5eb 100644 --- a/src/id3/v2/tag.rs +++ b/src/id3/v2/tag.rs @@ -190,6 +190,14 @@ impl ID3v2Tag { self.frames.retain(|f| f.id_str() != id) } + /// Retains [`Frame`]s by evaluating the predicate + pub fn retain
(&mut self, predicate: P) + where + P: FnMut(&Frame<'_>) -> bool, + { + self.frames.retain(predicate) + } + /// Inserts a [`Picture`] /// /// According to spec, there can only be one picture of type [`PictureType::Icon`] and [`PictureType::OtherIcon`].