pub struct RichTextElementConfig<'a> {
pub text: OwnedOrRef<'a, str>,
pub default_config: TextConfigStylePair,
pub configs: Vec<TextConfigStylePair>,
pub config_ranges: Vec<(Range<usize>, usize)>,
}Expand description
Rich text configuration with per-range overrides.
config_ranges contains (range, config_index) pairs mapping text ranges to
entries in configs.
Fields§
§text: OwnedOrRef<'a, str>Full text content.
default_config: TextConfigStylePairFallback style/config used when no range override matches.
configs: Vec<TextConfigStylePair>Override configs used by range mappings.
config_ranges: Vec<(Range<usize>, usize)>Mappings from character range to an index in configs.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RichTextElementConfig<'a>
impl<'a> !UnwindSafe for RichTextElementConfig<'a>
impl<'a> Freeze for RichTextElementConfig<'a>
impl<'a> Send for RichTextElementConfig<'a>
impl<'a> Sync for RichTextElementConfig<'a>
impl<'a> Unpin for RichTextElementConfig<'a>
impl<'a> UnsafeUnpin for RichTextElementConfig<'a>
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
Source§impl<H, TailTarget, Source, Idx> Embed<RenderTList<H, TailTarget>, There<Idx>> for Sourcewhere
TailTarget: IsRenderList,
Source: Embed<TailTarget, Idx>,
impl<H, TailTarget, Source, Idx> Embed<RenderTList<H, TailTarget>, There<Idx>> for Sourcewhere
TailTarget: IsRenderList,
Source: Embed<TailTarget, Idx>,
Source§fn embed(self) -> RenderTList<H, TailTarget>
fn embed(self) -> RenderTList<H, TailTarget>
Converts
self into Target.