pub struct TextOptions {
pub style: TextStyle,
pub markdown: bool,
pub max_items: Option<usize>,
}Expand description
Options controlling text formatting behavior.
Fields§
§style: TextStyleThe rendering style to use.
markdown: boolWhether to wrap output in markdown formatting.
max_items: Option<usize>Maximum number of items to display in collections.
Implementations§
Source§impl TextOptions
impl TextOptions
Sourcepub fn with_style(self, style: TextStyle) -> Self
pub fn with_style(self, style: TextStyle) -> Self
Set the text style.
Sourcepub fn with_markdown(self, markdown: bool) -> Self
pub fn with_markdown(self, markdown: bool) -> Self
Enable or disable markdown formatting.
Sourcepub fn with_max_items(self, max_items: Option<usize>) -> Self
pub fn with_max_items(self, max_items: Option<usize>) -> Self
Set the maximum number of items to display.
Trait Implementations§
Source§impl Clone for TextOptions
impl Clone for TextOptions
Source§fn clone(&self) -> TextOptions
fn clone(&self) -> TextOptions
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 TextOptions
impl Debug for TextOptions
Source§impl Default for TextOptions
impl Default for TextOptions
Source§fn default() -> TextOptions
fn default() -> TextOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextOptions
impl RefUnwindSafe for TextOptions
impl Send for TextOptions
impl Sync for TextOptions
impl Unpin for TextOptions
impl UnwindSafe for TextOptions
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