Struct lofty::ogg::VorbisComments
source · [−]pub struct VorbisComments { /* private fields */ }Expand description
Vorbis comments
Implementations
sourceimpl VorbisComments
impl VorbisComments
sourcepub fn set_vendor(&mut self, vendor: String)
pub fn set_vendor(&mut self, vendor: String)
Sets the vendor string
sourcepub fn get_item(&self, key: &str) -> Option<&str>
pub fn get_item(&self, key: &str) -> Option<&str>
Gets an item by key
NOTE: This is case-sensitive
sourcepub fn insert_item(&mut self, key: String, value: String, replace_all: bool)
pub fn insert_item(&mut self, key: String, value: String, replace_all: bool)
Inserts an item
If replace_all is true, it will remove all items with the key before insertion
sourcepub fn remove_key(&mut self, key: &str)
pub fn remove_key(&mut self, key: &str)
Removes an item by key
NOTE: This is case-sensitive
sourcepub fn insert_picture(
&mut self,
picture: Picture
) -> Result<Option<(Picture, PictureInformation)>>
pub fn insert_picture(
&mut self,
picture: Picture
) -> Result<Option<(Picture, PictureInformation)>>
Inserts a Picture
According to spec, there can only be one picture of type PictureType::Icon and PictureType::OtherIcon.
When attempting to insert these types, if another is found it will be removed and returned.
Errors
sourcepub fn remove_picture_type(&mut self, picture_type: PictureType)
pub fn remove_picture_type(&mut self, picture_type: PictureType)
Removes a certain PictureType
Trait Implementations
sourceimpl Accessor for VorbisComments
impl Accessor for VorbisComments
sourcefn set_artist(&mut self, value: String)
fn set_artist(&mut self, value: String)
Sets the artist Read more
sourcefn remove_artist(&mut self)
fn remove_artist(&mut self)
Removes the artist Read more
sourcefn remove_title(&mut self)
fn remove_title(&mut self)
Removes the title Read more
sourcefn remove_album(&mut self)
fn remove_album(&mut self)
Removes the album Read more
sourcefn remove_genre(&mut self)
fn remove_genre(&mut self)
Removes the genre Read more
sourceimpl Clone for VorbisComments
impl Clone for VorbisComments
sourcefn clone(&self) -> VorbisComments
fn clone(&self) -> VorbisComments
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for VorbisComments
impl Debug for VorbisComments
sourceimpl Default for VorbisComments
impl Default for VorbisComments
sourcefn default() -> VorbisComments
fn default() -> VorbisComments
Returns the “default value” for a type. Read more
sourceimpl From<VorbisComments> for Tag
impl From<VorbisComments> for Tag
sourcefn from(input: VorbisComments) -> Self
fn from(input: VorbisComments) -> Self
Performs the conversion.
sourceimpl PartialEq<VorbisComments> for VorbisComments
impl PartialEq<VorbisComments> for VorbisComments
sourcefn eq(&self, other: &VorbisComments) -> bool
fn eq(&self, other: &VorbisComments) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &VorbisComments) -> bool
fn ne(&self, other: &VorbisComments) -> bool
This method tests for !=.
sourceimpl TagExt for VorbisComments
impl TagExt for VorbisComments
sourcefn save_to(&self, file: &mut File) -> Result<(), Self::Err>
fn save_to(&self, file: &mut File) -> Result<(), Self::Err>
Writes the tag to a file
Errors
- Attempting to write the tag to a format that does not support it
- The file does not contain valid packets
PictureInformation::from_picturestd::io::Error
sourcefn dump_to<W: Write>(&self, writer: &mut W) -> Result<(), Self::Err>
fn dump_to<W: Write>(&self, writer: &mut W) -> Result<(), Self::Err>
Dumps the tag to a writer
This does not include a vendor string, and will thus not create a usable file.
Errors
type Err = LoftyError
type Err = LoftyError
The associated error which can be returned from IO operations
impl StructuralPartialEq for VorbisComments
Auto Trait Implementations
impl RefUnwindSafe for VorbisComments
impl Send for VorbisComments
impl Sync for VorbisComments
impl Unpin for VorbisComments
impl UnwindSafe for VorbisComments
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more