pub struct Form {
pub style: ContentStyle,
}Expand description
A style for text.
Fields§
§style: ContentStyleThe actual style that is applied
Implementations§
Source§impl Form
impl Form
Sourcepub const fn underlined() -> BuiltForm
pub const fn underlined() -> BuiltForm
New Form with the
underlined
attribute
Sourcepub const fn double_underlined() -> BuiltForm
pub const fn double_underlined() -> BuiltForm
New Form with the
double_underlined
attribute
Sourcepub const fn undercurled() -> BuiltForm
pub const fn undercurled() -> BuiltForm
New Form with the
undercurled
attribute
Sourcepub const fn underdashed() -> BuiltForm
pub const fn underdashed() -> BuiltForm
New Form with the
underdashed
attribute
Sourcepub const fn crossed_out() -> BuiltForm
pub const fn crossed_out() -> BuiltForm
New Form with the
crossed_out
attribute
Sourcepub const fn underline_black() -> BuiltForm
pub const fn underline_black() -> BuiltForm
New Form with a
black
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn on_dark_grey() -> BuiltForm
pub const fn on_dark_grey() -> BuiltForm
New Form with a
dark_grey
background
Sourcepub const fn underline_dark_grey() -> BuiltForm
pub const fn underline_dark_grey() -> BuiltForm
New Form with a
dark_grey
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn underline_red() -> BuiltForm
pub const fn underline_red() -> BuiltForm
New Form with a
red
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn on_dark_red() -> BuiltForm
pub const fn on_dark_red() -> BuiltForm
New Form with a
dark_red
background
Sourcepub const fn underline_dark_red() -> BuiltForm
pub const fn underline_dark_red() -> BuiltForm
New Form with a
dark_red
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn underline_green() -> BuiltForm
pub const fn underline_green() -> BuiltForm
New Form with a
green
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn dark_green() -> BuiltForm
pub const fn dark_green() -> BuiltForm
New Form with a
dark_green
foreground
Sourcepub const fn on_dark_green() -> BuiltForm
pub const fn on_dark_green() -> BuiltForm
New Form with a
dark_green
background
Sourcepub const fn underline_dark_green() -> BuiltForm
pub const fn underline_dark_green() -> BuiltForm
New Form with a
dark_green
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn underline_yellow() -> BuiltForm
pub const fn underline_yellow() -> BuiltForm
New Form with a
yellow
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn dark_yellow() -> BuiltForm
pub const fn dark_yellow() -> BuiltForm
New Form with a
dark_yellow
foreground
Sourcepub const fn on_dark_yellow() -> BuiltForm
pub const fn on_dark_yellow() -> BuiltForm
New Form with a
dark_yellow
background
Sourcepub const fn underline_dark_yellow() -> BuiltForm
pub const fn underline_dark_yellow() -> BuiltForm
New Form with a
dark_yellow
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn underline_blue() -> BuiltForm
pub const fn underline_blue() -> BuiltForm
New Form with a
blue
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn on_dark_blue() -> BuiltForm
pub const fn on_dark_blue() -> BuiltForm
New Form with a
dark_blue
background
Sourcepub const fn underline_dark_blue() -> BuiltForm
pub const fn underline_dark_blue() -> BuiltForm
New Form with a
dark_blue
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn on_magenta() -> BuiltForm
pub const fn on_magenta() -> BuiltForm
New Form with a
magenta
background
Sourcepub const fn underline_magenta() -> BuiltForm
pub const fn underline_magenta() -> BuiltForm
New Form with a
magenta
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn dark_magenta() -> BuiltForm
pub const fn dark_magenta() -> BuiltForm
New Form with a
dark_magenta
foreground
Sourcepub const fn on_dark_magenta() -> BuiltForm
pub const fn on_dark_magenta() -> BuiltForm
New Form with a
dark_magenta
background
Sourcepub const fn underline_dark_magenta() -> BuiltForm
pub const fn underline_dark_magenta() -> BuiltForm
New Form with a
dark_magenta
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn underline_cyan() -> BuiltForm
pub const fn underline_cyan() -> BuiltForm
New Form with a
cyan
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn on_dark_cyan() -> BuiltForm
pub const fn on_dark_cyan() -> BuiltForm
New Form with a
dark_cyan
background
Sourcepub const fn underline_dark_cyan() -> BuiltForm
pub const fn underline_dark_cyan() -> BuiltForm
New Form with a
dark_cyan
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn underline_white() -> BuiltForm
pub const fn underline_white() -> BuiltForm
New Form with a
white
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Sourcepub const fn underline_grey() -> BuiltForm
pub const fn underline_grey() -> BuiltForm
New Form with a
grey
underlining
Do note that this feature may not be supported in all Uis,
for example, various terminals don’t support this feature,
since it is a part of the kitty protocol, and hasn’t been
universally accepted yet.
Ui: crate::ui::traits::RawUi
Source§impl Form
impl Form
Sourcepub const fn with(str: &str) -> BuiltForm
pub const fn with(str: &str) -> BuiltForm
New Form with a colored foreground
This function accepts three color formats:
- A hexcode, like
"#abcdef", capitalization is ignored; - Three rgb values, like
"rgb 123 456 789"; - Three hsl values, like
"hsl {hue} {sat} {lit}", where {hue}, {sat} and {lit} can either be a number from0..255, or a percentage, followed by'%', e.g."hsl 234 50% 42".
Sourcepub const fn on(str: &str) -> BuiltForm
pub const fn on(str: &str) -> BuiltForm
New Form with a colored background
This function accepts three color formats:
- A hexcode, like
"#abcdef", capitalization is ignored; - Three rgb values, like
"rgb 123 456 789"; - Three hsl values, like
"hsl {hue} {sat} {lit}", where {hue}, {sat} and {lit} can either be a number from0..255, or a percentage, followed by'%', e.g."hsl 234 50% 42".
Sourcepub const fn underline(str: &str) -> BuiltForm
pub const fn underline(str: &str) -> BuiltForm
New Form with a colored underlining
This function accepts three color formats:
- A hexcode, like
"#abcdef", capitalization is ignored; - Three rgb values, like
"rgb 123 456 789"; - Three hsl values, like
"hsl {hue} {sat} {lit}", where {hue}, {sat} and {lit} can either be a number from0..255, or a percentage, followed by'%', e.g."hsl 234 50% 42".
Sourcepub const fn attrs(&self) -> Attributes
pub const fn attrs(&self) -> Attributes
The attributes
Trait Implementations§
impl Copy for Form
impl Eq for Form
impl StructuralPartialEq for Form
Auto Trait Implementations§
impl Freeze for Form
impl RefUnwindSafe for Form
impl Send for Form
impl Sync for Form
impl Unpin for Form
impl UnwindSafe for Form
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.