Struct id3::Tag
[−]
[src]
pub struct Tag { /* fields omitted */ }
An ID3 tag containing metadata frames.
Methods
impl<'a> Tag
[src]
fn new() -> Tag
[src]
Creates a new ID3v2.4 tag with no frames.
fn with_version(_: Version) -> Tag
[src]
: Tags now use ID3v2.4 for internal storage
Creates a new ID3 tag with the specified version.
fn is_candidate_v1<R: Read + Seek>(reader: &mut R) -> bool
[src]
: Use v1::Tag::is_candidate
Returns true if the reader might contain a valid ID3v1 tag.
fn read_from_v1<R: Read + Seek>(reader: &mut R) -> Result<Tag>
[src]
: Use tag_v1.into()
Attempts to read an ID3v1 tag from the reader. Since the structure of ID3v1 is so different from ID3v2, the tag will be converted and stored internally as an ID3v2.3 tag.
fn read_from_path_v1<P: AsRef<Path>>(path: P) -> Result<Tag>
[src]
: Use tag_v1.into()
Attempts to read an ID3v1 tag from the file at the specified path. The tag will be converted into an ID3v2.3 tag upon success.
fn version(&self) -> Version
[src]
: Tags now use ID3v2.4 for internal storage
Returns the version of the tag.
fn set_version(&mut self, _: Version)
[src]
: Tags now use ID3v2.4 for internal storage
Sets the version of this tag.
fn frames(&'a self) -> Box<Iterator<Item = &'a Frame> + 'a>
[src]
Returns an iterator over the all frames in the tag.
Example
use id3::{Tag, Frame, Content}; let mut tag = Tag::new(); tag.add_frame(Frame::with_content("TPE1", Content::Text("".to_string()))); tag.add_frame(Frame::with_content("APIC", Content::Text("".to_string()))); assert_eq!(tag.frames().count(), 2);
fn extended_texts(&'a self) -> Box<Iterator<Item = &'a ExtendedText> + 'a>
[src]
Returns an iterator over the extended texts in the tag.
fn extended_links(&'a self) -> Box<Iterator<Item = &'a ExtendedLink> + 'a>
[src]
Returns an iterator over the extended links in the tag.
fn comments(&'a self) -> Box<Iterator<Item = &'a Comment> + 'a>
[src]
Returns an iterator over the comments in the tag.
Example
use id3::{Tag, Frame}; use id3::frame::{Content, Comment}; let mut tag = Tag::new(); let frame = Frame::with_content("COMM", Content::Comment(Comment { lang: "eng".to_owned(), description: "key1".to_owned(), text: "value1".to_owned() })); tag.add_frame(frame); let frame = Frame::with_content("COMM", Content::Comment(Comment { lang: "eng".to_owned(), description: "key2".to_owned(), text: "value2".to_owned() })); tag.add_frame(frame); assert_eq!(tag.comments().count(), 2);
fn lyrics(&'a self) -> Box<Iterator<Item = &'a Lyrics> + 'a>
[src]
Returns an iterator over the extended links in the tag.
fn pictures(&'a self) -> Box<Iterator<Item = &'a Picture> + 'a>
[src]
Returns an iterator over the pictures in the tag.
Example
use id3::{Tag, Frame}; use id3::frame::{Content, Picture, PictureType}; let mut tag = Tag::new(); let picture = Picture { mime_type: String::new(), picture_type: PictureType::Other, description: String::new(), data: Vec::new(), }; tag.add_frame(Frame::with_content("APIC", Content::Picture(picture.clone()))); tag.add_frame(Frame::with_content("APIC", Content::Picture(picture.clone()))); assert_eq!(tag.pictures().count(), 1);
fn get(&self, id: &str) -> Option<&Frame>
[src]
Returns a reference to the first frame with the specified identifier.
Example
use id3::{Tag, Frame, Content}; let mut tag = Tag::new(); tag.add_frame(Frame::with_content("TIT2", Content::Text("".to_string()))); assert!(tag.get("TIT2").is_some()); assert!(tag.get("TCON").is_none());
fn get_all(&'a self, id: &str) -> Vec<&'a Frame>
[src]
: Combine frames() with Iterator::filter
Returns a vector of references to frames with the specified identifier.
Example
use id3::{Tag, Frame, Content}; let mut tag = Tag::new(); tag.add_frame(Frame::with_content("TPE1", Content::Text("".to_string()))); tag.add_frame(Frame::with_content("TALB", Content::Text("".to_string()))); assert_eq!(tag.get_all("TPE1").len(), 1); assert_eq!(tag.get_all("TALB").len(), 1);
fn push(&mut self, new_frame: Frame) -> bool
[src]
: Use add_frame
Adds the frame to the tag. The frame identifier will attempt to be converted into the corresponding identifier for the tag version.
Returns whether the frame was added to the tag. The only reason the frame would not be added to the tag is if the frame identifier could not be converted from the frame version to the tag version.
Example
use id3::{Tag, Frame, Content}; let mut tag = Tag::new(); tag.push(Frame::with_content("TALB", Content::Text("".to_string()))); assert_eq!(tag.frames().nth(0).unwrap().id(), "TALB");
fn add_frame(&mut self, new_frame: Frame) -> Option<Frame>
[src]
Adds the frame to the tag, replacing and returning any conflicting frame.
Example
use id3::{Tag, Frame, Content}; let mut tag = Tag::new(); tag.add_frame(Frame::with_content("TALB", Content::Text("".to_string()))); tag.add_frame(Frame::with_content("TALB", Content::Text("".to_string()))); assert_eq!(tag.frames().nth(0).unwrap().id(), "TALB");
fn add_text_frame<K: Into<String>, V: Into<String>>(&mut self, id: K, text: V)
[src]
: Use set_text()
Adds a text frame.
Example
use id3::Tag; let mut tag = Tag::new(); tag.add_text_frame("TRCK", "1/13"); assert_eq!(tag.get("TRCK").unwrap().content().text().unwrap(), "1/13");
fn set_text<K: Into<String>, V: Into<String>>(&mut self, id: K, text: V)
[src]
Adds a text frame.
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_text("TRCK", "1/13"); assert_eq!(tag.get("TRCK").unwrap().content().text().unwrap(), "1/13");
fn remove(&mut self, id: &str)
[src]
Removes all frames with the specified identifier.
Example
use id3::{Tag, Frame, Content}; let mut tag = Tag::new(); tag.add_frame(Frame::with_content("TALB", Content::Text("".to_string()))); tag.add_frame(Frame::with_content("TPE1", Content::Text("".to_string()))); assert_eq!(tag.frames().count(), 2); tag.remove("TALB"); assert_eq!(tag.frames().count(), 1); tag.remove("TPE1"); assert_eq!(tag.frames().count(), 0);
fn txxx(&self) -> Vec<(&str, &str)>
[src]
: Use extended_texts()
Returns a vector of the extended text (TXXX) description/value pairs.
fn add_extended_text<K: Into<String>, V: Into<String>>(
&mut self,
description: K,
value: V
)
[src]
&mut self,
description: K,
value: V
)
Adds a user defined text frame (TXXX).
Example
use id3::Tag; let mut tag = Tag::new(); tag.add_extended_text("key1", "value1"); tag.add_extended_text("key2", "value2"); assert_eq!(tag.extended_texts().count(), 2); assert!(tag.extended_texts().any(|t| t.description == "key1" && t.value == "value1")); assert!(tag.extended_texts().any(|t| t.description == "key2" && t.value == "value2"));
fn add_txxx<K: Into<String>, V: Into<String>>(
&mut self,
description: K,
value: V
)
[src]
&mut self,
description: K,
value: V
)
: Use add_extended_text()
Adds a user defined text frame (TXXX).
fn remove_extended_text(
&mut self,
description: Option<&str>,
value: Option<&str>
)
[src]
&mut self,
description: Option<&str>,
value: Option<&str>
)
Removes the user defined text frame (TXXX) with the specified key and value.
A key or value may be None
to specify a wildcard value.
Example
use id3::Tag; let mut tag = Tag::new(); tag.add_extended_text("key1", "value1"); tag.add_extended_text("key2", "value2"); tag.add_extended_text("key3", "value2"); tag.add_extended_text("key4", "value3"); tag.add_extended_text("key5", "value4"); assert_eq!(tag.extended_texts().count(), 5); tag.remove_extended_text(Some("key1"), None); assert_eq!(tag.extended_texts().count(), 4); tag.remove_extended_text(None, Some("value2")); assert_eq!(tag.extended_texts().count(), 2); tag.remove_extended_text(Some("key4"), Some("value3")); assert_eq!(tag.extended_texts().count(), 1); tag.remove_extended_text(None, None); assert_eq!(tag.extended_texts().count(), 0);
fn remove_txxx(&mut self, description: Option<&str>, value: Option<&str>)
[src]
: Use remove_extended_text()
Removes the user defined text frame (TXXX) with the specified key and value.
A key or value may be None
to specify a wildcard value.
fn add_picture(&mut self, picture: Picture)
[src]
Adds a picture frame (APIC). Any other pictures with the same type will be removed from the tag.
Example
use id3::Tag; use id3::frame::{Picture, PictureType}; let mut tag = Tag::new(); tag.add_picture(Picture { mime_type: "image/jpeg".to_string(), picture_type: PictureType::Other, description: "some image".to_string(), data: vec![], }); tag.add_picture(Picture { mime_type: "image/png".to_string(), picture_type: PictureType::Other, description: "some other image".to_string(), data: vec![], }); assert_eq!(tag.pictures().count(), 1); assert_eq!(&tag.pictures().nth(0).unwrap().mime_type[..], "image/png");
fn remove_picture_by_type(&mut self, picture_type: PictureType)
[src]
Removes all pictures of the specified type.
Example
use id3::Tag; use id3::frame::{Picture, PictureType}; let mut tag = Tag::new(); tag.add_picture(Picture { mime_type: "image/jpeg".to_string(), picture_type: PictureType::Other, description: "some image".to_string(), data: vec![], }); tag.add_picture(Picture { mime_type: "image/png".to_string(), picture_type: PictureType::CoverFront, description: "some other image".to_string(), data: vec![], }); assert_eq!(tag.pictures().count(), 2); tag.remove_picture_by_type(PictureType::CoverFront); assert_eq!(tag.pictures().count(), 1); assert_eq!(tag.pictures().nth(0).unwrap().picture_type, PictureType::Other);
fn add_comment(&mut self, comment: Comment)
[src]
Adds a comment (COMM).
Example
use id3::Tag; use id3::frame::Comment; let mut tag = Tag::new(); let com1 = Comment { lang: "eng".to_string(), description: "key1".to_string(), text: "value1".to_string(), }; let com2 = Comment { lang: "eng".to_string(), description: "key2".to_string(), text: "value2".to_string(), }; tag.add_comment(com1.clone()); tag.add_comment(com2.clone()); assert_eq!(tag.comments().count(), 2); assert_ne!(None, tag.comments().position(|c| *c == com1)); assert_ne!(None, tag.comments().position(|c| *c == com2));
fn remove_comment(&mut self, description: Option<&str>, text: Option<&str>)
[src]
Removes the comment (COMM) with the specified key and value.
A key or value may be None
to specify a wildcard value.
Example
use id3::Tag; use id3::frame::Comment; let mut tag = Tag::new(); tag.add_comment(Comment { lang: "eng".to_string(), description: "key1".to_string(), text: "value1".to_string(), }); tag.add_comment(Comment { lang: "eng".to_string(), description: "key2".to_string(), text: "value2".to_string(), }); assert_eq!(tag.comments().count(), 2); tag.remove_comment(Some("key1"), None); assert_eq!(tag.comments().count(), 1); tag.remove_comment(None, Some("value2")); assert_eq!(tag.comments().count(), 0);
fn year(&self) -> Option<i32>
[src]
Returns the year (TYER).
Returns None
if the year frame could not be found or if it could not be parsed.
Example
use id3::{Tag, Frame}; use id3::frame::Content; let mut tag = Tag::new(); assert!(tag.year().is_none()); let frame_valid = Frame::with_content("TYER", Content::Text("2014".to_owned())); tag.add_frame(frame_valid); assert_eq!(tag.year().unwrap(), 2014); tag.remove("TYER"); let frame_invalid = Frame::with_content("TYER", Content::Text("nope".to_owned())); tag.add_frame(frame_invalid); assert!(tag.year().is_none());
fn set_year(&mut self, year: i32)
[src]
Sets the year (TYER).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_year(2014); assert_eq!(tag.year().unwrap(), 2014);
fn date_recorded(&self) -> Option<Timestamp>
[src]
Return the content of the TRDC frame, if any
Example
use id3::Tag; use id3::Timestamp; let mut tag = Tag::new(); tag.set_date_recorded(Timestamp{ year: 2014, month: None, day: None, hour: None, minute: None, second: None }); assert_eq!(tag.date_recorded().unwrap().year, 2014);
fn set_date_recorded(&mut self, timestamp: Timestamp)
[src]
Sets the content of the TDRC frame
Example
use id3::Tag; use id3::Timestamp; let mut tag = Tag::new(); tag.set_date_recorded(Timestamp{ year: 2014, month: None, day: None, hour: None, minute: None, second: None }); assert_eq!(tag.date_recorded().unwrap().year, 2014);
fn date_released(&self) -> Option<Timestamp>
[src]
Return the content of the TDRL frame, if any
Example
use id3::Tag; use id3::Timestamp; let mut tag = Tag::new(); tag.set_date_released(Timestamp{ year: 2014, month: None, day: None, hour: None, minute: None, second: None }); assert_eq!(tag.date_released().unwrap().year, 2014);
fn set_date_released(&mut self, timestamp: Timestamp)
[src]
Sets the content of the TDRL frame
Example
use id3::Tag; use id3::Timestamp; let mut tag = Tag::new(); tag.set_date_released(Timestamp{ year: 2014, month: None, day: None, hour: None, minute: None, second: None }); assert_eq!(tag.date_released().unwrap().year, 2014);
fn artist(&self) -> Option<&str>
[src]
Returns the artist (TPE1).
Example
use id3::{Frame, Tag}; use id3::frame::Content; let mut tag = Tag::new(); let frame = Frame::with_content("TPE1", Content::Text("artist".to_owned())); tag.add_frame(frame); assert_eq!(tag.artist().unwrap(), "artist");
fn set_artist<T: Into<String>>(&mut self, artist: T)
[src]
Sets the artist (TPE1).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_artist("artist"); assert_eq!(tag.artist().unwrap(), "artist");
fn remove_artist(&mut self)
[src]
Removes the artist (TPE1).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_artist("artist"); assert!(tag.artist().is_some()); tag.remove_artist(); assert!(tag.artist().is_none());
fn album_artist(&self) -> Option<&str>
[src]
Sets the album artist (TPE2).
Example
use id3::{Frame, Tag}; use id3::frame::Content; let mut tag = Tag::new(); let frame = Frame::with_content("TPE2", Content::Text("artist".to_owned())); tag.add_frame(frame); assert_eq!(tag.album_artist().unwrap(), "artist");
fn set_album_artist<T: Into<String>>(&mut self, album_artist: T)
[src]
Sets the album artist (TPE2).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_album_artist("artist"); assert_eq!(tag.album_artist().unwrap(), "artist");
fn remove_album_artist(&mut self)
[src]
Removes the album artist (TPE2).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_album_artist("artist"); assert!(tag.album_artist().is_some()); tag.remove_album_artist(); assert!(tag.album_artist().is_none());
fn album(&self) -> Option<&str>
[src]
Returns the album (TALB).
Example
use id3::{Frame, Tag}; use id3::frame::Content; let mut tag = Tag::new(); let frame = Frame::with_content("TALB", Content::Text("album".to_owned())); tag.add_frame(frame); assert_eq!(tag.album().unwrap(), "album");
fn set_album<T: Into<String>>(&mut self, album: T)
[src]
Sets the album (TALB).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_album("album"); assert_eq!(tag.album().unwrap(), "album");
fn remove_album(&mut self)
[src]
Removes the album (TALB).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_album("album"); assert!(tag.album().is_some()); tag.remove_album(); assert!(tag.album().is_none());
fn title(&self) -> Option<&str>
[src]
Returns the title (TIT2).
Example
use id3::{Frame, Tag}; use id3::frame::Content; let mut tag = Tag::new(); let frame = Frame::with_content("TIT2", Content::Text("title".to_owned())); tag.add_frame(frame); assert_eq!(tag.title().unwrap(), "title");
fn set_title<T: Into<String>>(&mut self, title: T)
[src]
Sets the title (TIT2).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_title("title"); assert_eq!(tag.title().unwrap(), "title");
fn remove_title(&mut self)
[src]
Removes the title (TIT2).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_title("title"); assert!(tag.title().is_some()); tag.remove_title(); assert!(tag.title().is_none());
fn duration(&self) -> Option<u32>
[src]
Returns the duration (TLEN).
Example
use id3::{Frame, Tag}; use id3::frame::Content; let mut tag = Tag::new(); let frame = Frame::with_content("TLEN", Content::Text("350".to_owned())); tag.add_frame(frame); assert_eq!(tag.duration().unwrap(), 350);
fn set_duration(&mut self, duration: u32)
[src]
Sets the duration (TLEN).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_duration(350); assert_eq!(tag.duration().unwrap(), 350);
fn remove_duration(&mut self)
[src]
Removes the duration (TLEN).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_duration(350); assert!(tag.duration().is_some()); tag.remove_duration(); assert!(tag.duration().is_none());
fn genre(&self) -> Option<&str>
[src]
Returns the genre (TCON).
Example
use id3::{Frame, Tag}; use id3::frame::Content; let mut tag = Tag::new(); let frame = Frame::with_content("TCON", Content::Text("genre".to_owned())); tag.add_frame(frame); assert_eq!(tag.genre().unwrap(), "genre");
fn set_genre<T: Into<String>>(&mut self, genre: T)
[src]
Sets the genre (TCON).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_genre("genre"); assert_eq!(tag.genre().unwrap(), "genre");
fn remove_genre(&mut self)
[src]
Removes the genre (TCON).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_genre("genre"); assert!(tag.genre().is_some()); tag.remove_genre(); assert!(tag.genre().is_none());
fn disc(&self) -> Option<u32>
[src]
Returns the disc number (TPOS).
Example
use id3::{Tag, Frame}; use id3::frame::Content; let mut tag = Tag::new(); assert!(tag.disc().is_none()); let mut frame_valid = Frame::with_content("TPOS", Content::Text("4".to_owned())); tag.add_frame(frame_valid); assert_eq!(tag.disc().unwrap(), 4); tag.remove("TPOS"); let mut frame_invalid = Frame::with_content("TPOS", Content::Text("nope".to_owned())); tag.add_frame(frame_invalid); assert!(tag.disc().is_none());
fn set_disc(&mut self, disc: u32)
[src]
Sets the disc (TPOS).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_disc(2); assert_eq!(tag.disc().unwrap(), 2);
fn remove_disc(&mut self)
[src]
Removes the disc number (TPOS).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_disc(3); assert!(tag.disc().is_some()); tag.remove_disc(); assert!(tag.disc().is_none());
fn total_discs(&self) -> Option<u32>
[src]
Returns the total number of discs (TPOS).
Example
use id3::{Tag, Frame}; use id3::frame::Content; let mut tag = Tag::new(); assert!(tag.disc().is_none()); let frame_valid = Frame::with_content("TPOS", Content::Text("4/10".to_owned())); tag.add_frame(frame_valid); assert_eq!(tag.total_discs().unwrap(), 10); tag.remove("TPOS"); let frame_invalid = Frame::with_content("TPOS", Content::Text("4/nope".to_owned())); tag.add_frame(frame_invalid); assert!(tag.total_discs().is_none());
fn set_total_discs(&mut self, total_discs: u32)
[src]
Sets the total number of discs (TPOS).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_total_discs(10); assert_eq!(tag.total_discs().unwrap(), 10);
fn remove_total_discs(&mut self)
[src]
Removes the total number of discs (TPOS).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_total_discs(10); assert!(tag.total_discs().is_some()); tag.remove_total_discs(); assert!(tag.total_discs().is_none());
fn track(&self) -> Option<u32>
[src]
Returns the track number (TRCK).
Example
use id3::{Tag, Frame}; use id3::frame::Content; let mut tag = Tag::new(); assert!(tag.track().is_none()); let frame_valid = Frame::with_content("TRCK", Content::Text("4".to_owned())); tag.add_frame(frame_valid); assert_eq!(tag.track().unwrap(), 4); tag.remove("TRCK"); let frame_invalid = Frame::with_content("TRCK", Content::Text("nope".to_owned())); tag.add_frame(frame_invalid); assert!(tag.track().is_none());
fn set_track(&mut self, track: u32)
[src]
Sets the track (TRCK).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_track(10); assert_eq!(tag.track().unwrap(), 10);
fn remove_track(&mut self)
[src]
Removes the track number (TRCK).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_track(10); assert!(tag.track().is_some()); tag.remove_track(); assert!(tag.track().is_none());
fn total_tracks(&self) -> Option<u32>
[src]
Returns the total number of tracks (TRCK).
Example
use id3::{Tag, Frame}; use id3::frame::Content; let mut tag = Tag::new(); assert!(tag.total_tracks().is_none()); let frame_valid = Frame::with_content("TRCK", Content::Text("4/10".to_owned())); tag.add_frame(frame_valid); assert_eq!(tag.total_tracks().unwrap(), 10); tag.remove("TRCK"); let frame_invalid = Frame::with_content("TRCK", Content::Text("4/nope".to_owned())); tag.add_frame(frame_invalid); assert!(tag.total_tracks().is_none());
fn set_total_tracks(&mut self, total_tracks: u32)
[src]
Sets the total number of tracks (TRCK).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_total_tracks(10); assert_eq!(tag.total_tracks().unwrap(), 10);
fn remove_total_tracks(&mut self)
[src]
Removes the total number of tracks (TCON).
Example
use id3::Tag; let mut tag = Tag::new(); tag.set_total_tracks(10); assert!(tag.total_tracks().is_some()); tag.remove_total_tracks(); assert!(tag.total_tracks().is_none());
fn set_lyrics(&mut self, lyrics: Lyrics)
[src]
: There can be more than one lyrics frame
Sets the lyrics (USLT).
Example
use id3::Tag; use id3::frame::Lyrics; let mut tag = Tag::new(); tag.set_lyrics(Lyrics { lang: "eng".to_string(), description: "".to_string(), text: "The lyrics".to_string(), }); assert_eq!(tag.lyrics().nth(0).unwrap().text, "The lyrics");
fn remove_lyrics(&mut self)
[src]
: There can be more than one lyrics frame
Removes the lyrics text (USLT) from the tag.
Exmaple
use id3::Tag; use id3::frame::Lyrics; let mut tag = Tag::new(); tag.set_lyrics(Lyrics { lang: "eng".to_string(), description: "".to_string(), text: "The lyrics".to_string(), }); assert_eq!(1, tag.lyrics().count()); tag.remove_lyrics(); assert_eq!(0, tag.lyrics().count());
fn skip_metadata<R: Read + Seek>(reader: &mut R) -> Vec<u8>
[src]
: Use Tag::skip() instead
Returns the contents of the reader without any ID3 metadata.
fn is_candidate<R: Read + Seek>(reader: R) -> Result<bool>
[src]
Will return true if the reader is a candidate for an ID3 tag. The reader position will be reset back to the previous position before returning.
fn skip<R: Read + Seek>(reader: &mut R) -> Result<bool>
[src]
Detects the presense of an ID3v2 tag at the current position of the reader and skips it if it if found. Returns true if a tag was found.
fn read_from<R>(reader: R) -> Result<Tag> where
R: Read,
[src]
R: Read,
Attempts to read an ID3 tag from the reader.
fn read_from_path<P: AsRef<Path>>(path: P) -> Result<Tag>
[src]
Attempts to read an ID3 tag from the file at the indicated path.
fn write_to<W>(&self, writer: W, version: Version) -> Result<()> where
W: Write,
[src]
W: Write,
Attempts to write the ID3 tag to the writer using the specified version.
fn write_to_path<P: AsRef<Path>>(&self, path: P, version: Version) -> Result<()>
[src]
Attempts to write the ID3 tag from the file at the indicated path. If the specified path is the same path which the tag was read from, then the tag will be written to the padding if possible.
fn remove_from(file: &mut File) -> Result<bool>
[src]
Removes an ID3v2 tag from the specified file.
Returns true if the file initially contained a tag.
Trait Implementations
impl Clone for Tag
[src]
fn clone(&self) -> Tag
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Tag
[src]
impl Default for Tag
[src]
impl Eq for Tag
[src]
impl PartialEq for Tag
[src]
fn eq(&self, other: &Tag) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.