fn remove_encapsulated_object(
        &mut self,
        description: Option<&str>,
        mime_type: Option<&str>,
        filename: Option<&str>,
        data: Option<&[u8]>,
    ) {
        self.frames_vec_mut().retain(|frame| {
            if frame.id() == "GEOB" {
                match *frame.content() {
                    Content::EncapsulatedObject(ref ext) => {
                        let descr_match = description.map(|v| v == ext.description).unwrap_or(true);
                        let mime_match = mime_type.map(|v| v == ext.mime_type).unwrap_or(true);
                        let filename_match = filename.map(|v| v == ext.filename).unwrap_or(true);
                        let data_match = data.map(|v| v == ext.data).unwrap_or(true);
                        // True if we want to keep the frame.
                        !(descr_match && mime_match && filename_match && data_match)
                    }
                    _ => {
                        // A GEOB frame must always have content of the EncapsulatedObject type.
                        // Remove frames that do not fit this requirement.
                        false
                    }
                }
            } else {
                true
            }
        });
    }
/// Removes the encapsulated object frame (GEOB) with the specified key, MIME type, filename
/// and
/// data.
///
/// A key or value may be `None` to specify a wildcard value.
///
/// # Example
/// ```
/// use id3::{Tag, TagLike};
///
/// let mut tag = Tag::new();
///
/// tag.add_encapsulated_object("key1", "application/octet-stream", "filename1", &b"value1"[..]);
/// tag.add_encapsulated_object("key2", "text/plain", "filename2", &b"value2"[..]);
/// tag.add_encapsulated_object("key3", "text/plain", "filename3", &b"value2"[..]);
/// tag.add_encapsulated_object("key4", "application/octet-stream", "filename4", &b"value3"[..]);
/// tag.add_encapsulated_object("key5", "application/octet-stream", "filename4", &b"value4"[..]);
/// tag.add_encapsulated_object("key6", "application/octet-stream", "filename5", &b"value5"[..]);
/// tag.add_encapsulated_object("key7", "application/octet-stream", "filename6", &b"value6"[..]);
/// tag.add_encapsulated_object("key8", "application/octet-stream", "filename7", &b"value7"[..]);
/// assert_eq!(tag.encapsulated_objects().count(), 8);
///
/// tag.remove_encapsulated_object(Some("key1"), None, None, None);
/// assert_eq!(tag.encapsulated_objects().count(), 7);
///
/// tag.remove_encapsulated_object(None, Some("text/plain"), None, None);
/// assert_eq!(tag.encapsulated_objects().count(), 5);
///
/// tag.remove_encapsulated_object(None, None, Some("filename4"), None);
/// assert_eq!(tag.encapsulated_objects().count(), 3);
///
/// tag.remove_encapsulated_object(None, None, None, Some(&b"value5"[..]));
/// assert_eq!(tag.encapsulated_objects().count(), 2);
///
/// tag.remove_encapsulated_object(Some("key7"), None, Some("filename6"), None);
/// assert_eq!(tag.encapsulated_objects().count(), 1);
///
/// tag.remove_encapsulated_object(None, None, None, None);
/// assert_eq!(tag.encapsulated_objects().count(), 0);
/// ```
Removes the encapsulated object frame (GEOB) with the specified key, MIME type, filename
and
data.

A key or value may be `None` to specify a wildcard value.
Removes the encapsulated object frame ( GEOB ) with the specified key MIME type filename and data . A key or value may be ` None ` to specify a wildcard value .
fn remove_encapsulated_object(
        &mut self,
        description: Option<&str>,
        mime_type: Option<&str>,
        filename: Option<&str>,
        data: Option<&[u8]>,
    ) {
        self.frames_vec_mut().retain(|frame| {
            if frame.id() == "GEOB" {
                match *frame.content() {
                    Content::EncapsulatedObject(ref ext) => {
                        let descr_match = description.map(|v| v == ext.description).unwrap_or(true);
                        let mime_match = mime_type.map(|v| v == ext.mime_type).unwrap_or(true);
                        let filename_match = filename.map(|v| v == ext.filename).unwrap_or(true);
                        let data_match = data.map(|v| v == ext.data).unwrap_or(true);
                        // True if we want to keep the frame.
                        !(descr_match && mime_match && filename_match && data_match)
                    }
                    _ => {
                        // A GEOB frame must always have content of the EncapsulatedObject type.
                        // Remove frames that do not fit this requirement.
                        false
                    }
                }
            } else {
                true
            }
        });
    }
fn remove_encapsulated_object ( & mut self , description : Option < & str > , mime_type : Option < & str > , filename : Option < & str > , data : Option < & [ u8 ] > , ) { self . frames_vec_mut ( ) . retain ( | frame | { if frame . id ( ) == " " { match * frame . content ( ) { Content :: EncapsulatedObject ( ref ext ) => { let descr_match = description . map ( | v | v == ext . description ) . unwrap_or ( true ) ; let mime_match = mime_type . map ( | v | v == ext . mime_type ) . unwrap_or ( true ) ; let filename_match = filename . map ( | v | v == ext . filename ) . unwrap_or ( true ) ; let data_match = data . map ( | v | v == ext . data ) . unwrap_or ( true ) ; // True if we want to keep the frame. ! ( descr_match && mime_match && filename_match && data_match ) } _ => { // A GEOB frame must always have content of the EncapsulatedObject type. // Remove frames that do not fit this requirement. false } } } else { true } } ) ; }
Removes the encapsulated object frame (GEOB) with the specified key, MIME type, filename
and
data.
Removes the encapsulated object frame ( GEOB ) with the specified key MIME type filename and data .
&mut self
description
Option<&str>
mime_type
Option<&str>
filename
Option<&str>
data
Option<&[u8]>
&mut self
description
Option<&str>
mime_type
Option<&str>
filename
Option<&str>
data
Option<&[u8]>
example


let mut tag = Tag::new().

tag.add_encapsulated_object("key1", "application/octet-stream", "filename1", &b"value1"[..]);
tag.add_encapsulated_object("key2", "text/plain", "filename2", &b"value2"[..]);
tag.add_encapsulated_object("key3", "text/plain", "filename3", &b"value2"[..]);
tag.add_encapsulated_object("key4", "application/octet-stream", "filename4", &b"value3"[..]);
tag.add_encapsulated_object("key5", "application/octet-stream", "filename4", &b"value4"[..]);
tag.add_encapsulated_object("key6", "application/octet-stream", "filename5", &b"value5"[..]);
tag.add_encapsulated_object("key7", "application/octet-stream", "filename6", &b"value6"[..]);
tag.add_encapsulated_object("key8", "application/octet-stream", "filename7", &b"value7"[..]);
assert_eq!(tag.encapsulated_objects().count(), 8).



tag.remove_encapsulated_object(None, Some("text/plain"), None, None);
assert_eq!(tag.encapsulated_objects().count(), 5).



tag.remove_encapsulated_object(None, None, None, Some(&b"value5"[..]));
assert_eq!(tag.encapsulated_objects().count(), 2).

tag.remove_encapsulated_object(Some("key7"), None, Some("filename6"), None);
assert_eq!(tag.encapsulated_objects().count(), 1).


let mut tag = Tag :: new () . tag . add_encapsulated_object ( " key1 " " application / octet - stream " " filename1 " &b " value1 " [ .. ] ) ; tag . add_encapsulated_object ( " key2 " " text / plain " " filename2 " &b " value2 " [ .. ] ) ; tag . add_encapsulated_object ( " key3 " " text / plain " " filename3 " &b " value2 " [ .. ] ) ; tag . add_encapsulated_object ( " key4 " " application / octet - stream " " filename4 " &b " value3 " [ .. ] ) ; tag . add_encapsulated_object ( " key5 " " application / octet - stream " " filename4 " &b " value4 " [ .. ] ) ; tag . add_encapsulated_object ( " key6 " " application / octet - stream " " filename5 " &b " value5 " [ .. ] ) ; tag . add_encapsulated_object ( " key7 " " application / octet - stream " " filename6 " &b " value6 " [ .. ] ) ; tag . add_encapsulated_object ( " key8 " " application / octet - stream " " filename7 " &b " value7 " [ .. ] ) ; assert_eq! ( tag . encapsulated_objects () . count () 8 ) . tag . remove_encapsulated_object ( None Some ( " text / plain " ) None None ) ; assert_eq! ( tag . encapsulated_objects () . count () 5 ) . tag . remove_encapsulated_object ( None None None Some ( &b " value5 " [ .. ] )) ; assert_eq! ( tag . encapsulated_objects () . count () 2 ) . tag . remove_encapsulated_object ( Some ( " key7 " ) None Some ( " filename6 " ) None ) ; assert_eq! ( tag . encapsulated_objects () . count () 1 ) .