1
0
Fork 0
forked from alemi/upub

fix: dont publicly export macros

This commit is contained in:
əlemi 2024-04-06 18:34:15 +02:00
parent 5672f75242
commit b57d766b78
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 8 additions and 4 deletions

View file

@ -1,4 +1,5 @@
mod macros;
pub(crate) use macros::{strenum, getter, setter};
mod node;
pub use node::Node;
@ -6,7 +7,7 @@ pub use node::Node;
mod link;
pub use link::{Link, LinkMut, LinkType};
pub mod key;
mod key;
pub use key::{PublicKey, PublicKeyMut};
mod base;

View file

@ -17,7 +17,6 @@ impl From<TypeValueError> for sea_orm::TryGetError {
}
#[macro_export]
macro_rules! strenum {
( $(pub enum $enum_name:ident { $($flat:ident),* ; $($deep:ident($inner:ident)),* };)+ ) => {
$(
@ -95,7 +94,8 @@ macro_rules! strenum {
};
}
#[macro_export]
pub(crate) use strenum;
macro_rules! getter {
($name:ident -> type $t:ty) => {
fn $name(&self) -> Option<$t> {
@ -192,7 +192,8 @@ macro_rules! getter {
};
}
#[macro_export]
pub(crate) use getter;
macro_rules! setter {
($name:ident -> bool) => {
paste::item! {
@ -305,6 +306,8 @@ macro_rules! setter {
};
}
pub(crate) use setter;
#[cfg(feature = "unstructured")]
pub fn set_maybe_node(obj: &mut serde_json::Value, key: &str, node: crate::Node<serde_json::Value>) {
match node {