forked from alemi/upub
fix: dont publicly export macros
This commit is contained in:
parent
5672f75242
commit
b57d766b78
2 changed files with 8 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
mod macros;
|
mod macros;
|
||||||
|
pub(crate) use macros::{strenum, getter, setter};
|
||||||
|
|
||||||
mod node;
|
mod node;
|
||||||
pub use node::Node;
|
pub use node::Node;
|
||||||
|
@ -6,7 +7,7 @@ pub use node::Node;
|
||||||
mod link;
|
mod link;
|
||||||
pub use link::{Link, LinkMut, LinkType};
|
pub use link::{Link, LinkMut, LinkType};
|
||||||
|
|
||||||
pub mod key;
|
mod key;
|
||||||
pub use key::{PublicKey, PublicKeyMut};
|
pub use key::{PublicKey, PublicKeyMut};
|
||||||
|
|
||||||
mod base;
|
mod base;
|
||||||
|
|
|
@ -17,7 +17,6 @@ impl From<TypeValueError> for sea_orm::TryGetError {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! strenum {
|
macro_rules! strenum {
|
||||||
( $(pub enum $enum_name:ident { $($flat:ident),* ; $($deep:ident($inner:ident)),* };)+ ) => {
|
( $(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 {
|
macro_rules! getter {
|
||||||
($name:ident -> type $t:ty) => {
|
($name:ident -> type $t:ty) => {
|
||||||
fn $name(&self) -> Option<$t> {
|
fn $name(&self) -> Option<$t> {
|
||||||
|
@ -192,7 +192,8 @@ macro_rules! getter {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[macro_export]
|
pub(crate) use getter;
|
||||||
|
|
||||||
macro_rules! setter {
|
macro_rules! setter {
|
||||||
($name:ident -> bool) => {
|
($name:ident -> bool) => {
|
||||||
paste::item! {
|
paste::item! {
|
||||||
|
@ -305,6 +306,8 @@ macro_rules! setter {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) use setter;
|
||||||
|
|
||||||
#[cfg(feature = "unstructured")]
|
#[cfg(feature = "unstructured")]
|
||||||
pub fn set_maybe_node(obj: &mut serde_json::Value, key: &str, node: crate::Node<serde_json::Value>) {
|
pub fn set_maybe_node(obj: &mut serde_json::Value, key: &str, node: crate::Node<serde_json::Value>) {
|
||||||
match node {
|
match node {
|
||||||
|
|
Loading…
Reference in a new issue