Struct caption

Source
pub struct caption;
Expand description

The title of the table that is its parent, if it has a parent and that is a table element.

Trait Implementations§

Source§

impl Clone for caption

Source§

fn clone(&self) -> caption

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for caption

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Element for caption

Source§

type Kind = Normal

The kind of this element.
Source§

impl GlobalAttributes for caption

Source§

const access_key: Attribute = Attribute

Used as a guide for creating a keyboard shortcut that activates or focuses the element.
Source§

const autocapitalize: Attribute = Attribute

The autocapitalization behavior to use when the text is edited through non-keyboard methods.
Source§

const autofocus: Attribute = Attribute

Indicates whether the element should be automatically focused when the page is loaded.
Source§

const class: Attribute = Attribute

The class of the element.
Source§

const contenteditable: Attribute = Attribute

Whether the element is editable.
Source§

const dir: Attribute = Attribute

The text directionality of the element.
Source§

const draggable: Attribute = Attribute

Whether the element is draggable.
Source§

const enterkeyhint: Attribute = Attribute

A hint as to what the enter key should do.
Source§

const hidden: Attribute = Attribute

Whether the element is hidden from view.
Source§

const id: Attribute = Attribute

A unique identifier for the element.
Source§

const inert: Attribute = Attribute

Mark an element and its children as inert, disabling interaction.
Source§

const inputmode: Attribute = Attribute

Specifies what kind of input mechanism would be most helpful for users entering content.
Source§

const is: Attribute = Attribute

Specify which element this is a custom variant of.
Source§

const itemid: Attribute = Attribute

A global identifier for the item.
Source§

const itemprop: Attribute = Attribute

A property that the item has.
Source§

const itemref: Attribute = Attribute

A list of additional elements to crawl to find the name-value pairs of the item.
Source§

const itemscope: Attribute = Attribute

Creates a new item, a group of name-value pairs.
Source§

const itemtype: Attribute = Attribute

The item types of the item.
Source§

const lang: Attribute = Attribute

The language of the element.
Source§

const nonce: Attribute = Attribute

A cryptographic nonce (“number used once”) which can be used by Content Security Policy to determine whether or not a given fetch will be allowed to proceed.
Source§

const popover: Attribute = Attribute

When specified, the element won’t be rendered until it becomes shown, at which point it will be rendered on top of other page content.
Source§

const slot: Attribute = Attribute

The slot the element is inserted in.
Source§

const spellcheck: Attribute = Attribute

Whether the element is spellchecked or not.
Source§

const style: Attribute = Attribute

The CSS styling to apply to the element.
Source§

const tabindex: Attribute = Attribute

Customize the index of the element for sequential focus navigation.
Source§

const title: Attribute = Attribute

A text description of the element.
Source§

const translate: Attribute = Attribute

Whether the element is to be translated when the page is localized.
Source§

impl Copy for caption

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AlpineJsAttributes for T

Source§

const x_data: Attribute = Attribute

Available on crate feature alpine only.
Declare a new Alpine component and its data for a block of HTML
Source§

const x_bind: AttributeNamespace = AttributeNamespace

Available on crate feature alpine only.
Dynamically set HTML attributes on an element
Source§

const _colon: AttributeSymbol = AttributeSymbol

Available on crate feature alpine only.
Dynamically set HTML attributes on an element Read more
Source§

const x_on: AttributeNamespace = AttributeNamespace

Available on crate feature alpine only.
Listen for browser events on an element
Source§

const _at: AttributeSymbol = AttributeSymbol

Available on crate feature alpine only.
Listen for browser events on an element Read more
Source§

const x_text: Attribute = Attribute

Available on crate feature alpine only.
Set the text content of an element
Source§

const x_html: Attribute = Attribute

Available on crate feature alpine only.
Set the inner HTML of an element
Source§

const x_model: Attribute = Attribute

Available on crate feature alpine only.
Synchronize a piece of data with an input element
Source§

const x_show: Attribute = Attribute

Available on crate feature alpine only.
Toggle the visibility of an element
Source§

const x_transition: Attribute = Attribute

Available on crate feature alpine only.
Transition an element in and out using CSS transitions
Source§

const x_for: Attribute = Attribute

Available on crate feature alpine only.
Repeat a block of HTML based on a data set
Source§

const x_if: Attribute = Attribute

Available on crate feature alpine only.
Conditionally add/remove a block of HTML from the page entirely
Source§

const x_init: Attribute = Attribute

Available on crate feature alpine only.
Run code when an element is initialized by Alpine
Source§

const x_effect: Attribute = Attribute

Available on crate feature alpine only.
Execute a script each time const one: Attribute = Attribute; of its dependencies change
Source§

const x_ref: Attribute = Attribute

Available on crate feature alpine only.
Reference elements directly by their specified keys using the $refs magic property
Source§

const x_cloak: Attribute = Attribute

Available on crate feature alpine only.
Hide a block of HTML until after Alpine is finished initializing its contents
Source§

const x_ignore: Attribute = Attribute

Available on crate feature alpine only.
Prevent a block of HTML from being initialized by Alpine
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AriaAttributes for T

Source§

const role: Attribute = Attribute

Source§

const aria_activedescendant: Attribute = Attribute

Source§

const aria_atomic: Attribute = Attribute

Source§

const aria_autocomplete: Attribute = Attribute

Source§

const aria_braillelabel: Attribute = Attribute

Source§

const aria_brailleroledescription: Attribute = Attribute

Source§

const aria_busy: Attribute = Attribute

Source§

const aria_checked: Attribute = Attribute

Source§

const aria_colcount: Attribute = Attribute

Source§

const aria_colindex: Attribute = Attribute

Source§

const aria_colindextext: Attribute = Attribute

Source§

const aria_colspan: Attribute = Attribute

Source§

const aria_controls: Attribute = Attribute

Source§

const aria_current: Attribute = Attribute

Source§

const aria_describedby: Attribute = Attribute

Source§

const aria_description: Attribute = Attribute

Source§

const aria_details: Attribute = Attribute

Source§

const aria_disabled: Attribute = Attribute

Source§

const aria_dropeffect: Attribute = Attribute

Source§

const aria_errormessage: Attribute = Attribute

Source§

const aria_expanded: Attribute = Attribute

Source§

const aria_flowto: Attribute = Attribute

Source§

const aria_grabbed: Attribute = Attribute

Source§

const aria_haspopup: Attribute = Attribute

Source§

const aria_hidden: Attribute = Attribute

Source§

const aria_invalid: Attribute = Attribute

Source§

const aria_keyshortcuts: Attribute = Attribute

Source§

const aria_label: Attribute = Attribute

Source§

const aria_labelledby: Attribute = Attribute

Source§

const aria_level: Attribute = Attribute

Source§

const aria_live: Attribute = Attribute

Source§

const aria_modal: Attribute = Attribute

Source§

const aria_multiline: Attribute = Attribute

Source§

const aria_multiselectable: Attribute = Attribute

Source§

const aria_orientation: Attribute = Attribute

Source§

const aria_owns: Attribute = Attribute

Source§

const aria_placeholder: Attribute = Attribute

Source§

const aria_posinset: Attribute = Attribute

Source§

const aria_pressed: Attribute = Attribute

Source§

const aria_readonly: Attribute = Attribute

Source§

const aria_relevant: Attribute = Attribute

Source§

const aria_required: Attribute = Attribute

Source§

const aria_roledescription: Attribute = Attribute

Source§

const aria_rowcount: Attribute = Attribute

Source§

const aria_rowindex: Attribute = Attribute

Source§

const aria_rowindextext: Attribute = Attribute

Source§

const aria_rowspan: Attribute = Attribute

Source§

const aria_selected: Attribute = Attribute

Source§

const aria_setsize: Attribute = Attribute

Source§

const aria_sort: Attribute = Attribute

Source§

const aria_valuemax: Attribute = Attribute

Source§

const aria_valuemin: Attribute = Attribute

Source§

const aria_valuenow: Attribute = Attribute

Source§

const aria_valuetext: Attribute = Attribute

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> EventHandlerAttributes for T

Source§

const onabort: Attribute = Attribute

Source§

const onautocomplete: Attribute = Attribute

Source§

const onautocompleteerror: Attribute = Attribute

Source§

const onblur: Attribute = Attribute

Source§

const oncancel: Attribute = Attribute

Source§

const oncanplay: Attribute = Attribute

Source§

const oncanplaythrough: Attribute = Attribute

Source§

const onchange: Attribute = Attribute

Source§

const onclick: Attribute = Attribute

Source§

const onclose: Attribute = Attribute

Source§

const oncontextmenu: Attribute = Attribute

Source§

const oncuechange: Attribute = Attribute

Source§

const ondblclick: Attribute = Attribute

Source§

const ondrag: Attribute = Attribute

Source§

const ondragend: Attribute = Attribute

Source§

const ondragenter: Attribute = Attribute

Source§

const ondragleave: Attribute = Attribute

Source§

const ondragover: Attribute = Attribute

Source§

const ondragstart: Attribute = Attribute

Source§

const ondrop: Attribute = Attribute

Source§

const ondurationchange: Attribute = Attribute

Source§

const onemptied: Attribute = Attribute

Source§

const onended: Attribute = Attribute

Source§

const onerror: Attribute = Attribute

Source§

const onfocus: Attribute = Attribute

Source§

const oninput: Attribute = Attribute

Source§

const oninvalid: Attribute = Attribute

Source§

const onkeydown: Attribute = Attribute

Source§

const onkeypress: Attribute = Attribute

Source§

const onkeyup: Attribute = Attribute

Source§

const onload: Attribute = Attribute

Source§

const onloadeddata: Attribute = Attribute

Source§

const onloadedmetadata: Attribute = Attribute

Source§

const onloadstart: Attribute = Attribute

Source§

const onmousedown: Attribute = Attribute

Source§

const onmouseenter: Attribute = Attribute

Source§

const onmouseleave: Attribute = Attribute

Source§

const onmousemove: Attribute = Attribute

Source§

const onmouseout: Attribute = Attribute

Source§

const onmouseover: Attribute = Attribute

Source§

const onmouseup: Attribute = Attribute

Source§

const onmousewheel: Attribute = Attribute

Source§

const onpause: Attribute = Attribute

Source§

const onplay: Attribute = Attribute

Source§

const onplaying: Attribute = Attribute

Source§

const onprogress: Attribute = Attribute

Source§

const onratechange: Attribute = Attribute

Source§

const onreset: Attribute = Attribute

Source§

const onresize: Attribute = Attribute

Source§

const onscroll: Attribute = Attribute

Source§

const onseeked: Attribute = Attribute

Source§

const onseeking: Attribute = Attribute

Source§

const onselect: Attribute = Attribute

Source§

const onshow: Attribute = Attribute

Source§

const onsort: Attribute = Attribute

Source§

const onstalled: Attribute = Attribute

Source§

const onsubmit: Attribute = Attribute

Source§

const onsuspend: Attribute = Attribute

Source§

const ontimeupdate: Attribute = Attribute

Source§

const ontoggle: Attribute = Attribute

Source§

const onvolumechange: Attribute = Attribute

Source§

const onwaiting: Attribute = Attribute

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> HtmxAttributes for T

Source§

const hx_get: Attribute = Attribute

Available on crate feature htmx only.
Issues a GET to the specified URL
Source§

const hx_post: Attribute = Attribute

Available on crate feature htmx only.
Issues a POST to the specified URL
Source§

const hx_on: AttributeNamespace = AttributeNamespace

Available on crate feature htmx only.
Handle events with inline scripts on elements
Source§

const hx_push_url: Attribute = Attribute

Available on crate feature htmx only.
Push a URL into the browser location bar to create history
Source§

const hx_select: Attribute = Attribute

Available on crate feature htmx only.
Select content to swap in from a response
Source§

const hx_select_oob: Attribute = Attribute

Available on crate feature htmx only.
Select content to swap in from a response, somewhere other than the target (out of band)
Source§

const hx_swap: Attribute = Attribute

Available on crate feature htmx only.
Controls how content will swap in (outerHTML, beforeend, afterend, …)
Source§

const hx_swap_oob: Attribute = Attribute

Available on crate feature htmx only.
Mark element to swap in from a response (out of band)
Source§

const hx_target: Attribute = Attribute

Available on crate feature htmx only.
Specifies the target element to be swapped
Source§

const hx_trigger: Attribute = Attribute

Available on crate feature htmx only.
Specifies the event that triggers the request
Source§

const hx_vals: Attribute = Attribute

Available on crate feature htmx only.
Add values to submit with the request (JSON format)
Source§

const hx_boost: Attribute = Attribute

Available on crate feature htmx only.
Add progressive enhancement for links and forms
Source§

const hx_confirm: Attribute = Attribute

Available on crate feature htmx only.
Shows a confirm() dialog before issuing a request
Source§

const hx_delete: Attribute = Attribute

Available on crate feature htmx only.
Issues a DELETE to the specified URL
Source§

const hx_disable: Attribute = Attribute

Available on crate feature htmx only.
Disables htmx processing for the given node and any children nodes
Source§

const hx_disabled_elt: Attribute = Attribute

Available on crate feature htmx only.
Adds the disabled attribute to the specified elements while a request is in flight
Source§

const hx_disinherit: Attribute = Attribute

Available on crate feature htmx only.
Control and disable automatic attribute inheritance for child nodes
Source§

const hx_encoding: Attribute = Attribute

Available on crate feature htmx only.
Changes the request encoding type
Source§

const hx_ext: Attribute = Attribute

Available on crate feature htmx only.
Extensions to use for this element
Source§

const hx_headers: Attribute = Attribute

Available on crate feature htmx only.
Adds to the headers that will be submitted with the request
Source§

const hx_history: Attribute = Attribute

Available on crate feature htmx only.
Prevent sensitive data being saved to the history cache
Source§

const hx_history_elt: Attribute = Attribute

Available on crate feature htmx only.
The element to snapshot and restore during history navigation
Source§

const hx_include: Attribute = Attribute

Available on crate feature htmx only.
Include additional data in requests
Source§

const hx_indicator: Attribute = Attribute

Available on crate feature htmx only.
The element to put the htmx-request class on during the request
Source§

const hx_inherit: Attribute = Attribute

Available on crate feature htmx only.
Control and enable automatic attribute inheritance for child nodes if it has been disabled by default
Source§

const hx_params: Attribute = Attribute

Available on crate feature htmx only.
Filters the parameters that will be submitted with a request
Source§

const hx_patch: Attribute = Attribute

Available on crate feature htmx only.
Issues a PATCH to the specified URL
Source§

const hx_preserve: Attribute = Attribute

Available on crate feature htmx only.
Specifies elements to keep unchanged between requests
Source§

const hx_prompt: Attribute = Attribute

Available on crate feature htmx only.
Shows a prompt() before submitting a request
Source§

const hx_put: Attribute = Attribute

Available on crate feature htmx only.
Issues a PUT to the specified URL
Source§

const hx_replace_url: Attribute = Attribute

Available on crate feature htmx only.
Replace the URL in the browser location bar
Source§

const hx_request: Attribute = Attribute

Available on crate feature htmx only.
Configures various aspects of the request
Source§

const hx_sync: Attribute = Attribute

Available on crate feature htmx only.
Control how requests made by different elements are synchronized
Source§

const hx_validate: Attribute = Attribute

Available on crate feature htmx only.
Force elements to validate themselves before a request
Source§

const hx_vars: Attribute = Attribute

👎Deprecated: use hx-vals instead
Available on crate feature htmx only.
Adds values dynamically to the parameters to submit with the request (deprecated, please use hx-vals)
Source§

impl<T> HyperscriptAttributes for T

Source§

const __: Attribute = Attribute

Available on crate feature hyperscript only.
The _ hyperscript tag
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoCollection<T> for T

Source§

fn into_collection<A>(self) -> SmallVec<A>
where A: Array<Item = T>,

Converts self into a collection.
Source§

fn mapped<U, F, A>(self, f: F) -> SmallVec<A>
where F: FnMut(T) -> U, A: Array<Item = U>,

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,