pub struct OverlayOptions {
pub fg: Option<OverlayColorSpec>,
pub bg: Option<OverlayColorSpec>,
pub underline: bool,
pub bold: bool,
pub italic: bool,
pub strikethrough: bool,
pub extend_to_line_end: bool,
pub fg_on_collision_only: bool,
pub url: Option<String>,
}Expand description
Options for adding an overlay with theme support.
This struct provides a type-safe way to specify overlay styling with optional theme key references for colors.
Fields§
§fg: Option<OverlayColorSpec>Foreground color - RGB array or theme key string
bg: Option<OverlayColorSpec>Background color - RGB array or theme key string
underline: boolWhether to render with underline
bold: boolWhether to render in bold
italic: boolWhether to render in italic
strikethrough: boolWhether to render with strikethrough
extend_to_line_end: boolWhether to extend background color to end of line
fg_on_collision_only: boolWhen true, fg is applied only on cells whose existing fg
matches this overlay’s resolved bg — i.e. a same-colour fg/bg
collision. Lets a row-wide overlay stay legible on tokens that
share the bg’s colour without repainting unrelated tokens.
url: Option<String>Optional URL for OSC 8 terminal hyperlinks. When set, the overlay text becomes a clickable hyperlink in terminals that support OSC 8 escape sequences.
Trait Implementations§
Source§impl Clone for OverlayOptions
impl Clone for OverlayOptions
Source§fn clone(&self) -> OverlayOptions
fn clone(&self) -> OverlayOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OverlayOptions
impl Debug for OverlayOptions
Source§impl Default for OverlayOptions
impl Default for OverlayOptions
Source§fn default() -> OverlayOptions
fn default() -> OverlayOptions
Source§impl<'de> Deserialize<'de> for OverlayOptions
impl<'de> Deserialize<'de> for OverlayOptions
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>,
Source§impl Serialize for OverlayOptions
impl Serialize for OverlayOptions
Source§impl TS for OverlayOptions
impl TS for OverlayOptions
Source§type WithoutGenerics = OverlayOptions
type WithoutGenerics = OverlayOptions
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = OverlayOptions
type OptionInnerType = OverlayOptions
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read more