# Struct ansi_term::Style [−] [src]

    pub struct Style {
        // some fields omitted
    }

A style is a collection of properties that can format a string using ANSI escape codes.

## Methods

### `impl Style`

#### `fn new() -> Style`

Creates a new Style with no differences.

#### `fn paint<'a, S>(self, input: S) -> ANSIString<'a> where S: Into<Cow<'a, str>>`

Paints the given text with this colour, returning an ANSI string.

#### `fn bold(&self) -> Style`

Returns a Style with the bold property set.

#### `fn dimmed(&self) -> Style`

Returns a Style with the dimmed property set.

#### `fn italic(&self) -> Style`

Returns a Style with the italic property set.

#### `fn underline(&self) -> Style`

Returns a Style with the underline property set.

#### `fn blink(&self) -> Style`

Returns a Style with the blink property set.

#### `fn reverse(&self) -> Style`

Returns a Style with the reverse property set.

#### `fn hidden(&self) -> Style`

Returns a Style with the hidden property set.

#### `fn on(&self, background: Colour) -> Style`

Returns a Style with the background colour property set.

## Trait Implementations

### `impl Default for Style`

#### `fn default() -> Style`

### Derived Implementations

### `impl Debug for Style`

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

### `impl Copy for Style`

### `impl Clone for Style`

#### `fn clone(&self) -> Style`

#### `fn clone_from(&mut self, source: &Self)`1.0.0

### `impl PartialEq for Style`

#### `fn eq(&self, __arg_0: &Style) -> bool`

#### `fn ne(&self, __arg_0: &Style) -> bool`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)