#[derive(Valuable)]
{
// Attributes available to this derive:
#[valuable]
}
Available on crate feature
derive only.Expand description
Derive a Valuable implementation for a struct or enum.
§Attributes
§#[valuable(rename = "...")]
Use the given name instead of its Rust name.
§#[valuable(transparent)]
Delegate the trait implementation to the field.
This attribute can only be used on a struct that has a single field.
§#[valuable(skip)]
Skip the field.
§Examples
use valuable::Valuable;
#[derive(Valuable)]
struct HelloWorld {
message: Message,
}
#[derive(Valuable)]
enum Message {
HelloWorld,
Custom(String),
}