pub enum SummaryEntryStyle {
Default,
Custom(Arc<dyn Fn(&ParameterInfo) -> String + Send + Sync + 'static>),
}Expand description
Controls how parameter summary entries are rendered.
Variants§
Default
Render the default linked summary entry.
Custom(Arc<dyn Fn(&ParameterInfo) -> String + Send + Sync + 'static>)
Render each summary entry with a callback.
The callback should return a complete Markdown list item. If it returns an empty string, the parameter is skipped from the summary.
Implementations§
Source§impl SummaryEntryStyle
impl SummaryEntryStyle
Sourcepub fn custom(
formatter: impl Fn(&ParameterInfo) -> String + Send + Sync + 'static,
) -> Self
pub fn custom( formatter: impl Fn(&ParameterInfo) -> String + Send + Sync + 'static, ) -> Self
Create a custom summary entry callback.
Sourcepub fn render(
&self,
parameter: &ParameterInfo,
options: &SummaryOptions,
output: &mut String,
)
pub fn render( &self, parameter: &ParameterInfo, options: &SummaryOptions, output: &mut String, )
Render a summary entry for the given parameter.
Trait Implementations§
Source§impl Clone for SummaryEntryStyle
impl Clone for SummaryEntryStyle
Source§fn clone(&self) -> SummaryEntryStyle
fn clone(&self) -> SummaryEntryStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SummaryEntryStyle
impl !UnwindSafe for SummaryEntryStyle
impl Freeze for SummaryEntryStyle
impl Send for SummaryEntryStyle
impl Sync for SummaryEntryStyle
impl Unpin for SummaryEntryStyle
impl UnsafeUnpin for SummaryEntryStyle
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