Enum user_doc_doc_data::HelperAttr [−][src]
pub enum HelperAttr {
ChapterNum(usize),
ChapterNumSlug(Vec<usize>),
ChapterName(String),
ChapterNameSlug(Vec<String>),
ChapterBlurb(String),
}Expand description
Attribute helpers
When written in snake case (eg. ChapterNum -> chapter_num), the variants of this enum correspond to the
- helper attributes supported by the
user_doc_itemderive macro:
#[derive(user_doc_item)] // This line will NOT be in the produced documentation. struct SomeStruct { #[chapter_name("A chapter")] #[chapter_num(333)] // This line will be in the produced documentation. some_field: u8 }
- arguments supported by the
user_doc_fnattribute macro:
#[user_doc_fn(chapter_name("A chapter"), chapter_num(333))] // This line will be in the produced documentation. fn some_fn() -> () {}
The preceding examples both produce the same user-facing documentation. If both examples occurred in the same project, however, one would overwrite the other.
Variants
Number of this chapter
Tuple Fields of ChapterNum
0: usizeNumber-path up to and including this chapter
Name of this chapter
Tuple Fields of ChapterName
0: StringName-path up to and including this chapter
A blurb to add to the page for the chapter
Tuple Fields of ChapterBlurb
0: StringImplementations
Instantiate from an AttributeArgs (Vec
Instantiate from an Attribute if said Attribute represents a valid HelperAttr
Trait Implementations
Performs the conversion.
type Iterator = HelperAttrIter
fn iter() -> HelperAttrIterⓘNotable traits for HelperAttrIterimpl Iterator for HelperAttrIter type Item = HelperAttr;
impl Iterator for HelperAttrIter type Item = HelperAttr;This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for HelperAttr
impl Send for HelperAttr
impl Sync for HelperAttr
impl Unpin for HelperAttr
impl UnwindSafe for HelperAttr
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.