Skip to content

Commit

Permalink
VorbisComments: Add Tag conversion docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Serial-ATA committed Oct 17, 2023
1 parent 8c3d244 commit 8edf76e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/ogg/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ macro_rules! impl_accessor {
}
}

/// ## Conversions
///
/// ### To `Tag`
///
/// All items will be converted to a [`TagItem`], with all unknown keys being stored with [`ItemKey::Unknown`].
///
/// In order to preserve the vendor string, a required part of the OGG formats, it will simply be inserted as
/// [`ItemKey::EncoderSoftware`], given an item with this key does not already exist.
///
/// ### From `Tag`
///
/// If a [`TagItem`] with the key [`ItemKey::EncoderSoftware`] is available, it will be taken and
/// used for the vendor string.
///
/// When converting [Picture]s, they will first be passed through [`PictureInformation::from_picture`].
/// If the information is available, it will be used. Otherwise, the picture will be stored with zeroed out
/// [`PictureInformation`].
#[derive(Default, PartialEq, Eq, Debug, Clone)]
#[tag(
description = "Vorbis comments",
Expand Down

0 comments on commit 8edf76e

Please sign in to comment.