forked from alemi/upub
chore: macros under feature, less deps
This commit is contained in:
parent
980cc09bc3
commit
2e7b7074ea
3 changed files with 10 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "apb"
|
name = "apb"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = [ "alemi <me@alemi.dev>" ]
|
authors = [ "alemi <me@alemi.dev>" ]
|
||||||
description = "Traits and types to handle ActivityPub objects"
|
description = "Traits and types to handle ActivityPub objects"
|
||||||
|
@ -20,7 +20,7 @@ paste = "1.0"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
serde_json = { version = "1", optional = true }
|
serde_json = { version = "1", optional = true }
|
||||||
sea-orm = { version = "0.12", optional = true }
|
sea-orm = { version = "0.12", optional = true, default-features = false }
|
||||||
reqwest = { version = "0.12", features = ["json"], optional = true }
|
reqwest = { version = "0.12", features = ["json"], optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
|
|
||||||
|
|
||||||
mod macros;
|
mod macros;
|
||||||
pub(crate) use macros::{strenum, getter, setter};
|
pub(crate) use macros::strenum;
|
||||||
|
|
||||||
|
#[cfg(feature = "unstructured")]
|
||||||
|
pub(crate) use macros::{getter, setter};
|
||||||
|
|
||||||
mod node;
|
mod node;
|
||||||
pub use node::Node;
|
pub use node::Node;
|
||||||
|
|
|
@ -114,6 +114,7 @@ macro_rules! strenum {
|
||||||
|
|
||||||
pub(crate) use strenum;
|
pub(crate) use strenum;
|
||||||
|
|
||||||
|
#[cfg(feature = "unstructured")]
|
||||||
macro_rules! getter {
|
macro_rules! getter {
|
||||||
($name:ident -> type $t:ty) => {
|
($name:ident -> type $t:ty) => {
|
||||||
paste::paste! {
|
paste::paste! {
|
||||||
|
@ -208,8 +209,10 @@ macro_rules! getter {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "unstructured")]
|
||||||
pub(crate) use getter;
|
pub(crate) use getter;
|
||||||
|
|
||||||
|
#[cfg(feature = "unstructured")]
|
||||||
macro_rules! setter {
|
macro_rules! setter {
|
||||||
($name:ident -> bool) => {
|
($name:ident -> bool) => {
|
||||||
paste::item! {
|
paste::item! {
|
||||||
|
@ -300,6 +303,7 @@ macro_rules! setter {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "unstructured")]
|
||||||
pub(crate) use setter;
|
pub(crate) use setter;
|
||||||
|
|
||||||
#[cfg(feature = "unstructured")]
|
#[cfg(feature = "unstructured")]
|
||||||
|
|
Loading…
Reference in a new issue