diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-12 14:21:53 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-12 14:21:53 +0200 |
commit | 504729a4a0c8f3e0d8fc9159e0273150b169e184 (patch) | |
tree | a6bf291322decccd6011580337b1feed6151b554 /src/event.rs | |
parent | db5a491e6c2223d1db9b458307431a54db3c40f2 (diff) | |
download | markdown-rs-504729a4a0c8f3e0d8fc9159e0273150b169e184.tar.gz markdown-rs-504729a4a0c8f3e0d8fc9159e0273150b169e184.tar.bz2 markdown-rs-504729a4a0c8f3e0d8fc9159e0273150b169e184.zip |
Refactor to improve docs of each function
Diffstat (limited to 'src/event.rs')
-rw-r--r-- | src/event.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/event.rs b/src/event.rs index 664a609..51ecd86 100644 --- a/src/event.rs +++ b/src/event.rs @@ -1887,7 +1887,7 @@ pub enum Content { Text, } -/// A link to another event. +/// Link to another event. #[derive(Debug, Clone)] pub struct Link { pub previous: Option<usize>, @@ -1895,7 +1895,7 @@ pub struct Link { pub content_type: Content, } -/// A location in the document (`line`/`column`/`offset`). +/// Place in the document. /// /// The interface for the location in the document comes from unist `Point`: /// <https://github.com/syntax-tree/unist#point>. @@ -1916,7 +1916,7 @@ pub struct Point { pub vs: usize, } -/// Possible event kinds. +/// Event kinds. #[derive(Debug, PartialEq, Clone)] pub enum Kind { /// The start of something. @@ -1928,8 +1928,12 @@ pub enum Kind { /// Something semantic happening somewhere. #[derive(Debug, Clone)] pub struct Event { + /// Kind of event. pub kind: Kind, + /// Name of event. pub name: Name, + /// Place where this happens. pub point: Point, + /// Link to another event. pub link: Option<Link>, } |