lofty_attr: Publish

This commit is contained in:
Serial 2022-08-10 14:28:48 -04:00
parent 1b546700d5
commit 0e857de104
No known key found for this signature in database
GPG key ID: DA95198DC17C4568
4 changed files with 13 additions and 3 deletions

View file

@ -20,7 +20,7 @@ struct MyFile {
// Tag field requirements:
// * Fields *must* end with "_tag" to set them apart from the others.
// * The type of the field *must* implement `Into<Tag>`
// * The type of the field *must* implement `TagExt`
// Specify a tag type

View file

@ -1,7 +1,13 @@
[package]
name = "lofty_attr"
version = "0.1.0"
version = "0.3.0"
authors = ["Serial <69764315+Serial-ATA@users.noreply.github.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Macros for Lofty"
repository = "https://github.com/Serial-ATA/lofty-rs"
readme = "README.md"
include = ["src", "Cargo.toml", "../LICENSE-*"]
[dependencies]
syn = { version = "1.0.95", features = ["full"] }

1
lofty_attr/README.md Normal file
View file

@ -0,0 +1 @@
This crate provides macros for [Lofty](https://crates.io/crates/lofty).

View file

@ -12,8 +12,11 @@ const LOFTY_FILE_TYPES: [&str; 10] = [
"AIFF", "APE", "FLAC", "MPEG", "MP4", "Opus", "Vorbis", "Speex", "WAV", "WavPack",
];
/// Creates a file usable by Lofty
///
/// See [here](https://github.com/Serial-ATA/lofty-rs/tree/main/examples/custom_resolver) for an example of how to use it.
#[proc_macro_derive(LoftyFile, attributes(lofty))]
pub fn tag(input: TokenStream) -> TokenStream {
pub fn lofty_file(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as DeriveInput);
let mut errors = Vec::new();