pub struct Documentation {
pub summary: String,
pub description: Option<String>,
pub examples: Vec<Example>,
pub notes: Vec<String>,
pub see_also: Vec<String>,
}Expand description
Long-form documentation with examples and usage notes.
Fields§
§summary: StringBrief one-line summary
description: Option<String>Detailed description (markdown supported)
examples: Vec<Example>Usage examples
notes: Vec<String>Usage notes and best practices
see_also: Vec<String>Related symbols (predicates, domains)
Implementations§
Source§impl Documentation
impl Documentation
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the detailed description.
Sourcepub fn add_example(&mut self, example: Example)
pub fn add_example(&mut self, example: Example)
Adds an example.
Sourcepub fn add_see_also(&mut self, symbol: impl Into<String>)
pub fn add_see_also(&mut self, symbol: impl Into<String>)
Adds a related symbol reference.
Trait Implementations§
Source§impl Clone for Documentation
impl Clone for Documentation
Source§fn clone(&self) -> Documentation
fn clone(&self) -> Documentation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Documentation
impl Debug for Documentation
Source§impl<'de> Deserialize<'de> for Documentation
impl<'de> Deserialize<'de> for Documentation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Documentation
impl PartialEq for Documentation
Source§impl Serialize for Documentation
impl Serialize for Documentation
impl StructuralPartialEq for Documentation
Auto Trait Implementations§
impl Freeze for Documentation
impl RefUnwindSafe for Documentation
impl Send for Documentation
impl Sync for Documentation
impl Unpin for Documentation
impl UnwindSafe for Documentation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more