Struct metaflac::block::VorbisComment[][src]

pub struct VorbisComment {
    pub vendor_string: String,
    pub comments: HashMap<String, Vec<String>>,
}
Expand description

A structure representing a VORBIS_COMMENT block.

Fields

vendor_string: String

The vendor string.

comments: HashMap<String, Vec<String>>

A map of keys to a list of their values.

Implementations

Returns a new VorbisComment with an empty vendor string and no comments.

Attempts to parse the bytes as a vorbis comment block. Returns a VorbisComment on success.

Returns a vector representation of the vorbis comment suitable for writing to a file.

Returns a reference to the vector of comments for the specified key.

Sets the comments for the specified key. Any previous values under the key will be removed.

Removes the comments for the specified key.

Removes any matching key/value pairs.

Returns a reference to the vector of values with the ARTIST key.

Sets the values for the ARTIST key. This will result in any ARTISTSORT comment being removed.

Removes all values with the ARTIST key. This will result in any ARTISTSORT comments being removed as well.

Returns a reference to the vector of values with the ALBUM key.

Sets the values for the ALBUM key. This will result in any ALBUMSORT comments being removed.

Removes all values with the ALBUM key. This will result in any ALBUMSORT comments being removed as well.

Returns a reference to the vector of values with the GENRE key.

Sets the values for the GENRE key.

Removes all values with the GENRE key.

Returns reference to the vector of values with the TITLE key.

Sets the values for the TITLE key. This will result in any TITLESORT comments being removed.

Removes all values with the TITLE key. This will result in any TITLESORT comments being removed as well.

Attempts to convert the first TRACKNUMBER comment to a u32.

Sets the TRACKNUMBER comment.

Removes all values with the TRACKNUMBER key.

Attempts to convert the first TOTALTRACKS comment to a u32.

Sets the TOTALTRACKS comment.

Removes all values with the TOTALTRACKS key.

Returns a reference to the vector of values with the ALBUMARTIST key.

Sets the values for the ALBUMARTIST key. This will result in any ALBUMARTISTSORT comments being removed.

Removes all values with the ALBUMARTIST key. This will result in any ALBUMARTISTSORT comments being removed as well.

Returns a reference to the vector of values with the LYRICS key.

Sets the values for the LYRICS key.

Removes all values with the LYRICS key.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.