pub trait Accessor {
Show 30 methods
// Provided methods
fn artist(&self) -> Option<Cow<'_, str>> { ... }
fn set_artist(&mut self, _value: String) { ... }
fn remove_artist(&mut self) { ... }
fn title(&self) -> Option<Cow<'_, str>> { ... }
fn set_title(&mut self, _value: String) { ... }
fn remove_title(&mut self) { ... }
fn album(&self) -> Option<Cow<'_, str>> { ... }
fn set_album(&mut self, _value: String) { ... }
fn remove_album(&mut self) { ... }
fn genre(&self) -> Option<Cow<'_, str>> { ... }
fn set_genre(&mut self, _value: String) { ... }
fn remove_genre(&mut self) { ... }
fn track(&self) -> Option<u32> { ... }
fn set_track(&mut self, _value: u32) { ... }
fn remove_track(&mut self) { ... }
fn track_total(&self) -> Option<u32> { ... }
fn set_track_total(&mut self, _value: u32) { ... }
fn remove_track_total(&mut self) { ... }
fn disk(&self) -> Option<u32> { ... }
fn set_disk(&mut self, _value: u32) { ... }
fn remove_disk(&mut self) { ... }
fn disk_total(&self) -> Option<u32> { ... }
fn set_disk_total(&mut self, _value: u32) { ... }
fn remove_disk_total(&mut self) { ... }
fn year(&self) -> Option<u32> { ... }
fn set_year(&mut self, _value: u32) { ... }
fn remove_year(&mut self) { ... }
fn comment(&self) -> Option<Cow<'_, str>> { ... }
fn set_comment(&mut self, _value: String) { ... }
fn remove_comment(&mut self) { ... }
}
Expand description
Provides accessors for common items
This attempts to only provide methods for items that all tags have in common, but there may be exceptions.
Provided Methods§
sourcefn artist(&self) -> Option<Cow<'_, str>>
fn artist(&self) -> Option<Cow<'_, str>>
Returns the artist
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.artist(), None);
sourcefn set_artist(&mut self, _value: String)
fn set_artist(&mut self, _value: String)
sourcefn remove_artist(&mut self)
fn remove_artist(&mut self)
sourcefn title(&self) -> Option<Cow<'_, str>>
fn title(&self) -> Option<Cow<'_, str>>
Returns the title
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.title(), None);
sourcefn remove_title(&mut self)
fn remove_title(&mut self)
sourcefn album(&self) -> Option<Cow<'_, str>>
fn album(&self) -> Option<Cow<'_, str>>
Returns the album
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.album(), None);
sourcefn remove_album(&mut self)
fn remove_album(&mut self)
sourcefn genre(&self) -> Option<Cow<'_, str>>
fn genre(&self) -> Option<Cow<'_, str>>
Returns the genre
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.genre(), None);
sourcefn remove_genre(&mut self)
fn remove_genre(&mut self)
sourcefn track(&self) -> Option<u32>
fn track(&self) -> Option<u32>
Returns the track
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.track(), None);
sourcefn remove_track(&mut self)
fn remove_track(&mut self)
sourcefn track_total(&self) -> Option<u32>
fn track_total(&self) -> Option<u32>
Returns the track total
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.track_total(), None);
sourcefn set_track_total(&mut self, _value: u32)
fn set_track_total(&mut self, _value: u32)
sourcefn remove_track_total(&mut self)
fn remove_track_total(&mut self)
sourcefn disk(&self) -> Option<u32>
fn disk(&self) -> Option<u32>
Returns the disk
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.disk(), None);
sourcefn remove_disk(&mut self)
fn remove_disk(&mut self)
sourcefn disk_total(&self) -> Option<u32>
fn disk_total(&self) -> Option<u32>
Returns the disk total
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.disk_total(), None);
sourcefn set_disk_total(&mut self, _value: u32)
fn set_disk_total(&mut self, _value: u32)
sourcefn remove_disk_total(&mut self)
fn remove_disk_total(&mut self)
sourcefn year(&self) -> Option<u32>
fn year(&self) -> Option<u32>
Returns the year
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.year(), None);
sourcefn remove_year(&mut self)
fn remove_year(&mut self)
sourcefn comment(&self) -> Option<Cow<'_, str>>
fn comment(&self) -> Option<Cow<'_, str>>
Returns the comment
§Example
use lofty::{Tag, Accessor};
let mut tag = Tag::new(tag_type); ///
assert_eq!(tag.comment(), None);