mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-13 22:22:31 +00:00
ID3v2: Create From
impls for FrameValue
This commit is contained in:
parent
f8972f9122
commit
2dc7569017
1 changed files with 30 additions and 0 deletions
|
@ -217,6 +217,36 @@ impl From<ItemValue> for FrameValue {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<ExtendedTextFrame> for FrameValue {
|
||||
fn from(value: ExtendedTextFrame) -> Self {
|
||||
Self::UserText(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ExtendedUrlFrame> for FrameValue {
|
||||
fn from(value: ExtendedUrlFrame) -> Self {
|
||||
Self::UserURL(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<AttachedPictureFrame> for FrameValue {
|
||||
fn from(value: AttachedPictureFrame) -> Self {
|
||||
Self::Picture(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Popularimeter> for FrameValue {
|
||||
fn from(value: Popularimeter) -> Self {
|
||||
Self::Popularimeter(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UniqueFileIdentifierFrame> for FrameValue {
|
||||
fn from(value: UniqueFileIdentifierFrame) -> Self {
|
||||
Self::UniqueFileIdentifier(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl FrameValue {
|
||||
pub(super) fn as_bytes(&self) -> Result<Vec<u8>> {
|
||||
Ok(match self {
|
||||
|
|
Loading…
Reference in a new issue