[−][src]Struct term_string::TermStyle
pub struct TermStyle { /* fields omitted */ }
Styling info for TermString
.
Methods
impl TermStyle
[src]
impl TermStyle
Convenient methods for setting, unsetting, and checking Attr
variants
in a TermStyle
variable.
This block has helper methods for Attr
variants with no data:
(bold
, dim
, blink
, reverse
, secure
)
Examples
let mut style = TermStyle::bold(); assert!(style.has_bold()); style.unset_bold(); assert!(!style.has_bold());
pub fn bold() -> Self
[src]
pub fn bold() -> Self
Create a new TermStyle
with Attr::Bold
set.
This is equivalent to TermStyle::from([
Attr::Bold
])
.
pub fn dim() -> Self
[src]
pub fn dim() -> Self
pub fn blink() -> Self
[src]
pub fn blink() -> Self
Create a new TermStyle
with Attr::Blink
set.
This is equivalent to TermStyle::from([
Attr::Blink
])
.
pub fn reverse() -> Self
[src]
pub fn reverse() -> Self
Create a new TermStyle
with Attr::Reverse
set.
This is equivalent to TermStyle::from([
Attr::Reverse
])
.
pub fn secure() -> Self
[src]
pub fn secure() -> Self
Create a new TermStyle
with Attr::Secure
set.
This is equivalent to TermStyle::from([
Attr::Secure
])
.
pub fn has_bold(&self) -> bool
[src]
pub fn has_bold(&self) -> bool
Check if Attr::Bold
is set in style.
pub fn has_dim(&self) -> bool
[src]
pub fn has_dim(&self) -> bool
Check if Attr::Dim
is set in style.
pub fn has_blink(&self) -> bool
[src]
pub fn has_blink(&self) -> bool
Check if Attr::Blink
is set in style.
pub fn has_reverse(&self) -> bool
[src]
pub fn has_reverse(&self) -> bool
Check if Attr::Reverse
is set in style.
pub fn has_secure(&self) -> bool
[src]
pub fn has_secure(&self) -> bool
Check if Attr::Secure
is set in style.
pub fn add_bold(&mut self)
[src]
pub fn add_bold(&mut self)
Set/Add Attr::Bold
to style.
pub fn with_bold(self) -> Self
[src]
pub fn with_bold(self) -> Self
The chaining equivalent of add_bold()
.
pub fn add_dim(&mut self)
[src]
pub fn add_dim(&mut self)
Set/Add Attr::Dim
to style.
pub fn with_dim(self) -> Self
[src]
pub fn with_dim(self) -> Self
The chaining equivalent of add_dim()
.
pub fn add_blink(&mut self)
[src]
pub fn add_blink(&mut self)
Set/Add Attr::Blink
to style.
pub fn with_blink(self) -> Self
[src]
pub fn with_blink(self) -> Self
The chaining equivalent of add_blink()
.
pub fn add_reverse(&mut self)
[src]
pub fn add_reverse(&mut self)
Set/Add Attr::Reverse
to style.
pub fn with_reverse(self) -> Self
[src]
pub fn with_reverse(self) -> Self
The chaining equivalent of add_reverse()
.
pub fn add_secure(&mut self)
[src]
pub fn add_secure(&mut self)
Set/Add Attr::Secure
to style.
pub fn with_secure(self) -> Self
[src]
pub fn with_secure(self) -> Self
The chaining equivalent of add_secure()
.
pub fn unset_bold(&mut self)
[src]
pub fn unset_bold(&mut self)
Unset/Remove Attr::Bold
from style.
pub fn without_bold(self) -> Self
[src]
pub fn without_bold(self) -> Self
The chaining equivalent of unset_bold()
.
pub fn unset_dim(&mut self)
[src]
pub fn unset_dim(&mut self)
Unset/Remove Attr::Dim
from style.
pub fn without_dim(self) -> Self
[src]
pub fn without_dim(self) -> Self
The chaining equivalent of unset_dim()
.
pub fn unset_blink(&mut self)
[src]
pub fn unset_blink(&mut self)
Unset/Remove Attr::Blink
from style.
pub fn without_blink(self) -> Self
[src]
pub fn without_blink(self) -> Self
The chaining equivalent of unset_blink()
.
pub fn unset_reverse(&mut self)
[src]
pub fn unset_reverse(&mut self)
Unset/Remove Attr::Reverse
from style.
pub fn without_reverse(self) -> Self
[src]
pub fn without_reverse(self) -> Self
The chaining equivalent of unset_reverse()
.
pub fn unset_secure(&mut self)
[src]
pub fn unset_secure(&mut self)
Unset/Remove Attr::Secure
from style.
pub fn without_secure(self) -> Self
[src]
pub fn without_secure(self) -> Self
The chaining equivalent of unset_secure()
.
impl TermStyle
[src]
impl TermStyle
Convenient methods for setting, unsetting, and checking Attr
variants
in a TermStyle
variable.
This block has helper methods for Attr
variants with bool
data:
(italic
, underline
, standout
)
Note
Unlike the attribute variants in the above block, those attributes have
bool
data. This is because those capabilities were a late addition to
the terminfo
database. And when they were added, they were added in
pairs (enter capability mode, exit capability mode).
There is no reason and no need to set any of those attributes with false
here, as styles are fully reset between writes/prints. The API is still fully
exposed to stay close and introduce no magic over what the term
crate
exposes (Attr
is a re-export of term
::Attr).
Examples
let mut style = TermStyle::underline(true); // Returns true if underline is set, to true or false. assert!(style.has_underline()); assert!(style.has_exact_underline(true)); assert!(!style.has_exact_underline(false)); // style.unset_exact_underline(true); // Unsets whether underline is true or false. style.unset_underline(); assert!(!style.has_underline());
pub fn italic(arg: bool) -> Self
[src]
pub fn italic(arg: bool) -> Self
Create a new TermStyle
with Attr::Italic
(arg)
set.
This is equivalent to TermStyle::from([
Attr::Italic
(arg) ])
.
pub fn underline(arg: bool) -> Self
[src]
pub fn underline(arg: bool) -> Self
Create a new TermStyle
with Attr::Underline
(arg)
set.
This is equivalent to TermStyle::from([
Attr::Underline
(arg) ])
.
pub fn standout(arg: bool) -> Self
[src]
pub fn standout(arg: bool) -> Self
Create a new TermStyle
with Attr::Standout
(arg)
set.
This is equivalent to TermStyle::from([
Attr::Standout
(arg) ])
.
pub fn has_italic(&self) -> bool
[src]
pub fn has_italic(&self) -> bool
Check if Attr::Italic
(val)
is set in style.
where val
can be any value of bool
.
pub fn has_exact_italic(&self, arg: bool) -> bool
[src]
pub fn has_exact_italic(&self, arg: bool) -> bool
Check if Attr::Italic
(arg)
is set in style.
pub fn has_underline(&self) -> bool
[src]
pub fn has_underline(&self) -> bool
Check if Attr::Underline
(val)
is set in style.
where val
can be any value of bool
.
pub fn has_exact_underline(&self, arg: bool) -> bool
[src]
pub fn has_exact_underline(&self, arg: bool) -> bool
Check if Attr::Underline
(arg)
is set in style.
pub fn has_standout(&self) -> bool
[src]
pub fn has_standout(&self) -> bool
Check if Attr::Standout
(val)
is set in style.
where val
can be any value of bool
.
pub fn has_exact_standout(&self, arg: bool) -> bool
[src]
pub fn has_exact_standout(&self, arg: bool) -> bool
Check if Attr::Standout
(arg)
is set in style.
pub fn add_italic(&mut self, arg: bool)
[src]
pub fn add_italic(&mut self, arg: bool)
Set/Add Attr::Italic
(arg)
to style.
pub fn with_italic(self, arg: bool) -> Self
[src]
pub fn with_italic(self, arg: bool) -> Self
The chaining equivalent of add_italic()
.
pub fn or_italic(&mut self, arg: bool)
[src]
pub fn or_italic(&mut self, arg: bool)
Set/Add Attr::Italic
(arg)
to style,
if Attr::Italic
is not already set.
pub fn with_ored_italic(self, arg: bool) -> Self
[src]
pub fn with_ored_italic(self, arg: bool) -> Self
The chaining equivalent of or_italic()
.
pub fn add_underline(&mut self, arg: bool)
[src]
pub fn add_underline(&mut self, arg: bool)
Set/Add Attr::Underline
(arg)
to style.
pub fn with_underline(self, arg: bool) -> Self
[src]
pub fn with_underline(self, arg: bool) -> Self
The chaining equivalent of add_underline()
.
pub fn or_underline(&mut self, arg: bool)
[src]
pub fn or_underline(&mut self, arg: bool)
Set/Add Attr::Underline
(arg)
to style,
if Attr::Underline
is not already set.
pub fn with_ored_underline(self, arg: bool) -> Self
[src]
pub fn with_ored_underline(self, arg: bool) -> Self
The chaining equivalent of or_underline()
.
pub fn add_standout(&mut self, arg: bool)
[src]
pub fn add_standout(&mut self, arg: bool)
Set/Add Attr::Standout
(arg)
to style.
pub fn with_standout(self, arg: bool) -> Self
[src]
pub fn with_standout(self, arg: bool) -> Self
The chaining equivalent of add_standout()
.
pub fn or_standout(&mut self, arg: bool)
[src]
pub fn or_standout(&mut self, arg: bool)
Set/Add Attr::Standout
(arg)
to style,
if Attr::Standout
is not already set.
pub fn with_ored_standout(self, arg: bool) -> Self
[src]
pub fn with_ored_standout(self, arg: bool) -> Self
The chaining equivalent of or_standout()
.
pub fn unset_italic(&mut self)
[src]
pub fn unset_italic(&mut self)
Unset/Remove Attr::Italic
(val)
from style.
where val
can be any value of bool
.
pub fn without_italic(self) -> Self
[src]
pub fn without_italic(self) -> Self
The chaining equivalent of unset_italic()
.
pub fn unset_exact_italic(&mut self, arg: bool)
[src]
pub fn unset_exact_italic(&mut self, arg: bool)
Unset/Remove Attr::Italic
(arg)
from style.
pub fn without_exact_italic(self, arg: bool) -> Self
[src]
pub fn without_exact_italic(self, arg: bool) -> Self
The chaining equivalent of unset_exact_italic()
.
pub fn unset_underline(&mut self)
[src]
pub fn unset_underline(&mut self)
Unset/Remove Attr::Underline
(val)
from style.
where val
can be any value of bool
.
pub fn without_underline(self) -> Self
[src]
pub fn without_underline(self) -> Self
The chaining equivalent of unset_underline()
.
pub fn unset_exact_underline(&mut self, arg: bool)
[src]
pub fn unset_exact_underline(&mut self, arg: bool)
Unset/Remove Attr::Underline
(arg)
from style.
pub fn without_exact_underline(self, arg: bool) -> Self
[src]
pub fn without_exact_underline(self, arg: bool) -> Self
The chaining equivalent of unset_exact_underline()
.
pub fn unset_standout(&mut self)
[src]
pub fn unset_standout(&mut self)
Unset/Remove Attr::Standout
(val)
from style.
where val
can be any value of bool
.
pub fn without_standout(self) -> Self
[src]
pub fn without_standout(self) -> Self
The chaining equivalent of unset_standout()
.
pub fn unset_exact_standout(&mut self, arg: bool)
[src]
pub fn unset_exact_standout(&mut self, arg: bool)
Unset/Remove Attr::Standout
(arg)
from style.
pub fn without_exact_standout(self, arg: bool) -> Self
[src]
pub fn without_exact_standout(self, arg: bool) -> Self
The chaining equivalent of unset_exact_standout()
.
impl TermStyle
[src]
impl TermStyle
Convenient methods for setting, unsetting, and checking Attr
variants
in a TermStyle
variable.
This block has helper methods for Attr
variants with Color
data:
(fg
, bg
)
Examples
use term_string::{TermStyle, color}; let mut style = TermStyle::fg(color::BLUE); style += TermStyle::bg(color::WHITE); // ========== assert!(style.has_fg()); assert!(style.has_bg()); // ========== assert!(style.has_exact_fg(color::BLUE)); assert!(style.has_exact_bg(color::WHITE)); // ========== assert!(!style.has_exact_fg(color::RED)); assert!(!style.has_exact_bg(color::GREEN)); // ========== style.unset_exact_fg(color::RED); // no effect style.unset_exact_bg(color::GREEN); // no effect assert!(!style.has_exact_fg(color::RED)); assert!(!style.has_exact_bg(color::GREEN)); // ========== style.unset_fg(); style.unset_bg(); assert!(!style.has_fg()); assert!(!style.has_bg());
pub fn fg(arg: Color) -> Self
[src]
pub fn fg(arg: Color) -> Self
Create a new TermStyle
with Attr::ForegroundColor
(arg)
set.
This is equivalent to TermStyle::from([
Attr::ForegroundColor
(arg) ])
.
pub fn bg(arg: Color) -> Self
[src]
pub fn bg(arg: Color) -> Self
Create a new TermStyle
with Attr::BackgroundColor
(arg)
set.
This is equivalent to TermStyle::from([
Attr::BackgroundColor
(arg) ])
.
pub fn has_fg(&self) -> bool
[src]
pub fn has_fg(&self) -> bool
Check if Attr::ForegroundColor
(val)
is set in style.
where val
can be any value of Color
.
pub fn has_exact_fg(&self, arg: Color) -> bool
[src]
pub fn has_exact_fg(&self, arg: Color) -> bool
Check if Attr::ForegroundColor
(arg)
is set in style.
pub fn has_bg(&self) -> bool
[src]
pub fn has_bg(&self) -> bool
Check if Attr::BackgroundColor
(val)
is set in style.
where val
can be any value of Color
.
pub fn has_exact_bg(&self, arg: Color) -> bool
[src]
pub fn has_exact_bg(&self, arg: Color) -> bool
Check if Attr::BackgroundColor
(arg)
is set in style.
pub fn add_fg(&mut self, arg: Color)
[src]
pub fn add_fg(&mut self, arg: Color)
Set/Add Attr::ForegroundColor
(arg)
to style.
pub fn with_fg(self, arg: Color) -> Self
[src]
pub fn with_fg(self, arg: Color) -> Self
The chaining equivalent of add_fg()
.
pub fn or_fg(&mut self, arg: Color)
[src]
pub fn or_fg(&mut self, arg: Color)
Set/Add Attr::ForegroundColor
(arg)
to style,
if Attr::ForegroundColor
is not already set.
pub fn with_ored_fg(self, arg: Color) -> Self
[src]
pub fn with_ored_fg(self, arg: Color) -> Self
The chaining equivalent of or_fg()
.
pub fn add_bg(&mut self, arg: Color)
[src]
pub fn add_bg(&mut self, arg: Color)
Set/Add Attr::BackgroundColor
(arg)
to style.
pub fn with_bg(self, arg: Color) -> Self
[src]
pub fn with_bg(self, arg: Color) -> Self
The chaining equivalent of add_bg()
.
pub fn or_bg(&mut self, arg: Color)
[src]
pub fn or_bg(&mut self, arg: Color)
Set/Add Attr::BackgroundColor
(arg)
to style,
if Attr::BackgroundColor
is not already set.
pub fn with_ored_bg(self, arg: Color) -> Self
[src]
pub fn with_ored_bg(self, arg: Color) -> Self
The chaining equivalent of or_bg()
.
pub fn unset_fg(&mut self)
[src]
pub fn unset_fg(&mut self)
Unset/Remove Attr::ForegroundColor
(val)
from style.
where val
can be any value of Color
.
pub fn without_fg(self) -> Self
[src]
pub fn without_fg(self) -> Self
The chaining equivalent of unset_fg()
.
pub fn unset_exact_fg(&mut self, arg: Color)
[src]
pub fn unset_exact_fg(&mut self, arg: Color)
Unset/Remove Attr::ForegroundColor
(arg)
from style.
pub fn without_exact_fg(self, arg: Color) -> Self
[src]
pub fn without_exact_fg(self, arg: Color) -> Self
The chaining equivalent of unset_exact_fg()
.
pub fn unset_bg(&mut self)
[src]
pub fn unset_bg(&mut self)
Unset/Remove Attr::BackgroundColor
(val)
from style.
where val
can be any value of Color
.
pub fn without_bg(self) -> Self
[src]
pub fn without_bg(self) -> Self
The chaining equivalent of unset_bg()
.
pub fn unset_exact_bg(&mut self, arg: Color)
[src]
pub fn unset_exact_bg(&mut self, arg: Color)
Unset/Remove Attr::BackgroundColor
(arg)
from style.
pub fn without_exact_bg(self, arg: Color) -> Self
[src]
pub fn without_exact_bg(self, arg: Color) -> Self
The chaining equivalent of unset_exact_bg()
.
impl TermStyle
[src]
impl TermStyle
pub fn has_exact_attr(&self, attr: Attr) -> bool
[src]
pub fn has_exact_attr(&self, attr: Attr) -> bool
TermStyle
has attr set. Exact is referring to
attr's data, if exists, being included in
the check.
Examples
use term_string::{TermStyle, Attr}; let style = TermStyle::underline(true); assert!(style.has_exact_attr(Attr::Underline(true))); assert!(!style.has_exact_attr(Attr::Underline(false)));
pub fn has_variant_attr(&self, attr: Attr) -> bool
[src]
pub fn has_variant_attr(&self, attr: Attr) -> bool
TermStyle
has attr set. Variant is referring to
attr's data, if exists, being excluded from
the check.
Examples
use term_string::{TermStyle, Attr}; let style = TermStyle::underline(true); assert!(style.has_variant_attr(Attr::Underline(true))); assert!(style.has_variant_attr(Attr::Underline(false)));
pub fn unset_exact_attr(&mut self, attr: Attr)
[src]
pub fn unset_exact_attr(&mut self, attr: Attr)
Unset/Remove the exact Attr
from TermStyle
.
Examples
use term_string::{TermStyle, Attr}; let mut style = TermStyle::underline(true); // this does nothing, no exact match style.unset_exact_attr(Attr::Underline(false)); assert_ne!(style, TermStyle::default()); // this unsets underline, exact match style.unset_exact_attr(Attr::Underline(true)); assert_eq!(style, TermStyle::default());
pub fn unset_variant_attr(&mut self, attr: Attr)
[src]
pub fn unset_variant_attr(&mut self, attr: Attr)
Unset/Remove the variant Attr
from TermStyle
.
Examples
use term_string::{TermStyle, Attr}; let mut style = TermStyle::underline(true); // this unsets underline, even without exact match style.unset_variant_attr(Attr::Underline(false)); assert_eq!(style, TermStyle::default());
pub fn or_attr(&mut self, attr: Attr)
[src]
pub fn or_attr(&mut self, attr: Attr)
Set/Add attr to TermStyle
, unless the same variant
has been already set.
Examples
use term_string::{TermStyle, Attr, color}; let mut style = TermStyle::default(); // Add red background style.or_attr(Attr::BackgroundColor(color::RED)); assert!(style.has_exact_bg(color::RED)); // Add green background if background is not already set style.or_attr(Attr::BackgroundColor(color::GREEN)); // Since background was already set, it's still red assert!(style.has_exact_bg(color::RED));
pub fn add_attr(&mut self, attr: Attr)
[src]
pub fn add_attr(&mut self, attr: Attr)
Set/Add attr to TermStyle
, overriding the same variant
if it was already set.
Examples
use term_string::{TermStyle, Attr, color}; let mut style = TermStyle::default(); // Add red background style.add_attr(Attr::BackgroundColor(color::RED)); assert!(style.has_exact_bg(color::RED)); // Add green background, overriding already set background style.add_attr(Attr::BackgroundColor(color::GREEN)); // background will always be green after the above line assert!(style.has_exact_bg(color::GREEN));
pub fn without_exact_attr(self, attr: Attr) -> Self
[src]
pub fn without_exact_attr(self, attr: Attr) -> Self
The chaining equivalent of unset_exact_attr()
.
pub fn without_variant_attr(self, attr: Attr) -> Self
[src]
pub fn without_variant_attr(self, attr: Attr) -> Self
The chaining equivalent of unset_variant_attr()
.
pub fn with_attr(self, attr: Attr) -> Self
[src]
pub fn with_attr(self, attr: Attr) -> Self
The chaining equivalent of add_attr()
.
pub fn with_ored_attr(self, attr: Attr) -> Self
[src]
pub fn with_ored_attr(self, attr: Attr) -> Self
The chaining equivalent of or_attr()
.
impl TermStyle
[src]
impl TermStyle
Methods that take Into<Self>
as an argument. So you can either
pass TermStyle
, or Attr
arrays or slices.
These methods mirror the behavior of the methods above that take
a single Attr
argument, except they apply to all attributes set
in the style passed as argument.
Examples
use term_string::{TermStyle, Attr}; let st1 = TermStyle::default() .with_attr(Attr::Bold) .with_attr(Attr::Underline(true)); let st2 = TermStyle::default() .with_style([Attr::Bold, Attr::Underline(true)]); assert_eq!(st1, st2); assert!(st1.has_exact_style([Attr::Bold, Attr::Underline(true)])); assert!(st2.has_exact_style(st1));
pub fn has_exact_style<IS>(&self, other: IS) -> bool where
IS: Into<Self>,
[src]
pub fn has_exact_style<IS>(&self, other: IS) -> bool where
IS: Into<Self>,
Apply has_exact_attr()
to all Attr
s set in other.
pub fn has_variant_style<IS>(&self, other: IS) -> bool where
IS: Into<Self>,
[src]
pub fn has_variant_style<IS>(&self, other: IS) -> bool where
IS: Into<Self>,
Apply has_variant_attr()
to all Attr
s set in other.
pub fn unset_exact_style<IS>(&mut self, other: IS) where
IS: Into<Self>,
[src]
pub fn unset_exact_style<IS>(&mut self, other: IS) where
IS: Into<Self>,
Apply unset_exact_attr()
to all Attr
s set in other.
pub fn unset_variant_style<IS>(&mut self, other: IS) where
IS: Into<Self>,
[src]
pub fn unset_variant_style<IS>(&mut self, other: IS) where
IS: Into<Self>,
Apply unset_variant_attr()
to all Attr
s set in other.
pub fn or_style<IS>(&mut self, other: IS) where
IS: Into<Self>,
[src]
pub fn or_style<IS>(&mut self, other: IS) where
IS: Into<Self>,
pub fn add_style<IS>(&mut self, other: IS) where
IS: Into<Self>,
[src]
pub fn add_style<IS>(&mut self, other: IS) where
IS: Into<Self>,
Apply add_attr()
to all Attr
s set in other.
pub fn with_style<IS>(self, other: IS) -> Self where
IS: Into<Self>,
[src]
pub fn with_style<IS>(self, other: IS) -> Self where
IS: Into<Self>,
The chaining equivalent of add_style()
.
pub fn with_ored_style<IS>(self, other: IS) -> Self where
IS: Into<Self>,
[src]
pub fn with_ored_style<IS>(self, other: IS) -> Self where
IS: Into<Self>,
The chaining equivalent of or_style()
.
pub fn without_exact_style<IS>(self, other: IS) -> Self where
IS: Into<Self>,
[src]
pub fn without_exact_style<IS>(self, other: IS) -> Self where
IS: Into<Self>,
The chaining equivalent of unset_exact_style()
.
pub fn without_variant_style<IS>(self, other: IS) -> Self where
IS: Into<Self>,
[src]
pub fn without_variant_style<IS>(self, other: IS) -> Self where
IS: Into<Self>,
The chaining equivalent of unset_variant_style()
.
impl TermStyle
[src]
impl TermStyle
Other methods
pub fn reset(&mut self)
[src]
pub fn reset(&mut self)
Resets style to default.
pub fn eq_style<IS>(&self, other: IS) -> bool where
IS: Into<Self>,
[src]
pub fn eq_style<IS>(&self, other: IS) -> bool where
IS: Into<Self>,
Checks if both styles have the same exact attributes set.
This is used for implementing PartialEq
, so you should
probably use that instead.
Examples
use term_string::{TermStyle, Attr}; let st1 = TermStyle::bold() + TermStyle::underline(true); let st2 = st1 + TermStyle::reverse(); assert!(st1.eq_style([Attr::Underline(true), Attr::Bold])); // Needless to say, subset != equal assert!(!st2.eq_style(st1));
pub fn eq_variant_style<IS>(&self, other: IS) -> bool where
IS: Into<Self>,
[src]
pub fn eq_variant_style<IS>(&self, other: IS) -> bool where
IS: Into<Self>,
Checks if both styles have the same exact attribute variants set.
Examples
use term_string::{TermStyle, Attr}; let st1 = TermStyle::bold() + TermStyle::underline(true); let st2 = st1 + TermStyle::reverse(); assert!(st1.eq_variant_style([Attr::Underline(true), Attr::Bold])); // Same variant, different data still counts as equal assert!(st1.eq_variant_style([Attr::Underline(false), Attr::Bold]));
Trait Implementations
impl Copy for TermStyle
[src]
impl Copy for TermStyle
impl Clone for TermStyle
[src]
impl Clone for TermStyle
fn clone(&self) -> TermStyle
[src]
fn clone(&self) -> TermStyle
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for TermStyle
[src]
impl Default for TermStyle
impl Debug for TermStyle
[src]
impl Debug for TermStyle
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for TermStyle
[src]
impl PartialEq for TermStyle
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<A> From<A> for TermStyle where
A: Borrow<[Attr]>,
[src]
impl<A> From<A> for TermStyle where
A: Borrow<[Attr]>,
impl<IS> BitOr<IS> for TermStyle where
IS: Into<Self>,
[src]
impl<IS> BitOr<IS> for TermStyle where
IS: Into<Self>,
Check out or_style()
and or_attr()
.
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, other: IS) -> Self
[src]
fn bitor(self, other: IS) -> Self
Performs the |
operation.
impl<IS> BitOrAssign<IS> for TermStyle where
IS: Into<Self>,
[src]
impl<IS> BitOrAssign<IS> for TermStyle where
IS: Into<Self>,
fn bitor_assign(&mut self, other: IS)
[src]
fn bitor_assign(&mut self, other: IS)
Performs the |=
operation.
impl<IS> Add<IS> for TermStyle where
IS: Into<Self>,
[src]
impl<IS> Add<IS> for TermStyle where
IS: Into<Self>,
Check out add_style()
and add_attr()
.
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: IS) -> Self
[src]
fn add(self, other: IS) -> Self
Performs the +
operation.
impl<IS> AddAssign<IS> for TermStyle where
IS: Into<Self>,
[src]
impl<IS> AddAssign<IS> for TermStyle where
IS: Into<Self>,
fn add_assign(&mut self, other: IS)
[src]
fn add_assign(&mut self, other: IS)
Performs the +=
operation.
impl<IS> Sub<IS> for TermStyle where
IS: Into<Self>,
[src]
impl<IS> Sub<IS> for TermStyle where
IS: Into<Self>,
Check out unset_exact_style()
and unset_exact_attr()
.
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: IS) -> Self
[src]
fn sub(self, other: IS) -> Self
Performs the -
operation.
impl<IS> SubAssign<IS> for TermStyle where
IS: Into<Self>,
[src]
impl<IS> SubAssign<IS> for TermStyle where
IS: Into<Self>,
fn sub_assign(&mut self, other: IS)
[src]
fn sub_assign(&mut self, other: IS)
Performs the -=
operation.