Struct stylic::StyledLink
source · pub struct StyledLink<T, Uri> {
pub value: T,
pub style: Style,
pub uri: Uri,
}Expand description
A styled value with a URI, that implements Display.
See link for a convenient way to create a StyledLink.
See Stylize for available styling options.
Fields§
§value: T§style: Style§uri: UriImplementations§
Trait Implementations§
source§impl<T: Clone, Uri: Clone> Clone for StyledLink<T, Uri>
impl<T: Clone, Uri: Clone> Clone for StyledLink<T, Uri>
source§fn clone(&self) -> StyledLink<T, Uri>
fn clone(&self) -> StyledLink<T, Uri>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T: Default, Uri: Default> Default for StyledLink<T, Uri>
impl<T: Default, Uri: Default> Default for StyledLink<T, Uri>
source§fn default() -> StyledLink<T, Uri>
fn default() -> StyledLink<T, Uri>
Returns the “default value” for a type. Read more
source§impl<T: Ord, Uri: Ord> Ord for StyledLink<T, Uri>
impl<T: Ord, Uri: Ord> Ord for StyledLink<T, Uri>
source§fn cmp(&self, other: &StyledLink<T, Uri>) -> Ordering
fn cmp(&self, other: &StyledLink<T, Uri>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialOrd, Uri: PartialOrd> PartialOrd for StyledLink<T, Uri>
impl<T: PartialOrd, Uri: PartialOrd> PartialOrd for StyledLink<T, Uri>
source§impl<T, Uri> Stylize for StyledLink<T, Uri>
impl<T, Uri> Stylize for StyledLink<T, Uri>
source§fn underline_colored(self, color: impl Into<Color>) -> Self
fn underline_colored(self, color: impl Into<Color>) -> Self
Set the underline attribute and color.
source§fn attributes(self, attrs: Attributes) -> Self
fn attributes(self, attrs: Attributes) -> Self
Set the attributes. Read more
Set the hidden attribute.
source§fn strikethrough(self) -> Self
fn strikethrough(self) -> Self
Set the strikethrough attribute.
source§fn underline_black(self) -> Self
fn underline_black(self) -> Self
Set the underline attribute, and set the underline color to black.
source§fn underline_red(self) -> Self
fn underline_red(self) -> Self
Set the underline attribute, and set the underline color to red.
source§fn underline_green(self) -> Self
fn underline_green(self) -> Self
Set the underline attribute, and set the underline color to green.
source§fn underline_yellow(self) -> Self
fn underline_yellow(self) -> Self
Set the underline attribute, and set the underline color to yellow.
source§fn underline_blue(self) -> Self
fn underline_blue(self) -> Self
Set the underline attribute, and set the underline color to blue.
source§fn on_magenta(self) -> Self
fn on_magenta(self) -> Self
Set the background color to magenta.
source§fn underline_magenta(self) -> Self
fn underline_magenta(self) -> Self
Set the underline attribute, and set the underline color to magenta.
source§fn underline_cyan(self) -> Self
fn underline_cyan(self) -> Self
Set the underline attribute, and set the underline color to cyan.
source§fn underline_white(self) -> Self
fn underline_white(self) -> Self
Set the underline attribute, and set the underline color to white.
source§fn bright_black(self) -> Self
fn bright_black(self) -> Self
Set the foreground color to bright black.
source§fn on_bright_black(self) -> Self
fn on_bright_black(self) -> Self
Set the background color to bright black.
source§fn underline_bright_black(self) -> Self
fn underline_bright_black(self) -> Self
Set the underline attribute, and set the underline color to bright black.
source§fn bright_red(self) -> Self
fn bright_red(self) -> Self
Set the foreground color to bright red.
source§fn on_bright_red(self) -> Self
fn on_bright_red(self) -> Self
Set the background color to bright red.
source§fn underline_bright_red(self) -> Self
fn underline_bright_red(self) -> Self
Set the underline attribute, and set the underline color to bright red.
source§fn bright_green(self) -> Self
fn bright_green(self) -> Self
Set the foreground color to bright green.
source§fn on_bright_green(self) -> Self
fn on_bright_green(self) -> Self
Set the background color to bright green.
source§fn underline_bright_green(self) -> Self
fn underline_bright_green(self) -> Self
Set the underline attribute, and set the underline color to bright green.
source§fn bright_yellow(self) -> Self
fn bright_yellow(self) -> Self
Set the foreground color to bright yellow.
source§fn on_bright_yellow(self) -> Self
fn on_bright_yellow(self) -> Self
Set the background color to bright yellow.
source§fn underline_bright_yellow(self) -> Self
fn underline_bright_yellow(self) -> Self
Set the underline attribute, and set the underline color to bright yellow.
source§fn bright_blue(self) -> Self
fn bright_blue(self) -> Self
Set the foreground color to bright blue.
source§fn on_bright_blue(self) -> Self
fn on_bright_blue(self) -> Self
Set the background color to bright blue.
source§fn underline_bright_blue(self) -> Self
fn underline_bright_blue(self) -> Self
Set the underline attribute, and set the underline color to bright blue.
source§fn bright_magenta(self) -> Self
fn bright_magenta(self) -> Self
Set the foreground color to bright magenta.
source§fn on_bright_magenta(self) -> Self
fn on_bright_magenta(self) -> Self
Set the background color to bright magenta.
source§fn underline_bright_magenta(self) -> Self
fn underline_bright_magenta(self) -> Self
Set the underline attribute, and set the underline color to bright magenta.
source§fn bright_cyan(self) -> Self
fn bright_cyan(self) -> Self
Set the foreground color to bright cyan.
source§fn on_bright_cyan(self) -> Self
fn on_bright_cyan(self) -> Self
Set the background color to bright cyan.
source§fn underline_bright_cyan(self) -> Self
fn underline_bright_cyan(self) -> Self
Set the underline attribute, and set the underline color to bright cyan.
source§fn bright_white(self) -> Self
fn bright_white(self) -> Self
Set the foreground color to bright white.
source§fn on_bright_white(self) -> Self
fn on_bright_white(self) -> Self
Set the background color to bright white.
source§fn underline_bright_white(self) -> Self
fn underline_bright_white(self) -> Self
Set the underline attribute, and set the underline color to bright white.
impl<T: Copy, Uri: Copy> Copy for StyledLink<T, Uri>
impl<T: Eq, Uri: Eq> Eq for StyledLink<T, Uri>
impl<T, Uri> StructuralPartialEq for StyledLink<T, Uri>
Auto Trait Implementations§
impl<T, Uri> Freeze for StyledLink<T, Uri>
impl<T, Uri> RefUnwindSafe for StyledLink<T, Uri>where
T: RefUnwindSafe,
Uri: RefUnwindSafe,
impl<T, Uri> Send for StyledLink<T, Uri>
impl<T, Uri> Sync for StyledLink<T, Uri>
impl<T, Uri> Unpin for StyledLink<T, Uri>
impl<T, Uri> UnwindSafe for StyledLink<T, Uri>where
T: UnwindSafe,
Uri: UnwindSafe,
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)