Skip to content

Commit

Permalink
add doc for pub func
Browse files Browse the repository at this point in the history
Signed-off-by: guoweikang <[email protected]>
  • Loading branch information
guoweikang committed Oct 16, 2024
1 parent 6f38819 commit f0e1041
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ macro_rules! def_node {
}

impl $struct_name {
#[doc = "Create a node"]
pub const fn new(inner: $type) -> Self {
Self {
inner,
Expand All @@ -124,6 +125,7 @@ macro_rules! def_node {
}

#[inline]
#[doc = "Get inner"]
pub fn inner(&self) -> &$type {
&self.inner
}
Expand Down Expand Up @@ -160,6 +162,7 @@ macro_rules! def_generic_node {
}

impl<T> $struct_name<T> {
#[doc = "Create a node"]
pub const fn new(inner: T) -> Self {
Self {
inner,
Expand All @@ -168,6 +171,7 @@ macro_rules! def_generic_node {
}

#[inline]
#[doc = "Get inner"]
pub fn inner(&self) -> &T {
&self.inner
}
Expand Down

0 comments on commit f0e1041

Please sign in to comment.