pub enum ParameterContentStyle {
Table,
Text,
Custom(Arc<dyn Fn(&ParameterInfo) -> String + Send + Sync + 'static>),
}Expand description
Controls how detailed parameter content is rendered.
Variants§
Table
Render the metadata table.
Text
Render metadata as compact prose.
Custom(Arc<dyn Fn(&ParameterInfo) -> String + Send + Sync + 'static>)
Render the parameter content with a callback.
If the callback returns an empty string, no content is rendered.
Implementations§
Source§impl ParameterContentStyle
impl ParameterContentStyle
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 parameter content callback.
Sourcepub fn render(
&self,
parameter: &ParameterInfo,
options: &ParameterContentOptions,
output: &mut String,
)
pub fn render( &self, parameter: &ParameterInfo, options: &ParameterContentOptions, output: &mut String, )
Render the parameter content for the given parameter.
Trait Implementations§
Source§impl Clone for ParameterContentStyle
impl Clone for ParameterContentStyle
Source§fn clone(&self) -> ParameterContentStyle
fn clone(&self) -> ParameterContentStyle
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 ParameterContentStyle
impl !UnwindSafe for ParameterContentStyle
impl Freeze for ParameterContentStyle
impl Send for ParameterContentStyle
impl Sync for ParameterContentStyle
impl Unpin for ParameterContentStyle
impl UnsafeUnpin for ParameterContentStyle
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