Channels

Struct Channels 

Source
#[repr(transparent)]
pub struct Channels { pub nc: NcChannels, }
Expand description

A pair of both foreground and background Channels.

Fields§

§nc: NcChannels

Implementations§

Source§

impl Channels

§constructors

Source

pub fn new() -> Channels

A new pair of channels, set to black and NOT using the default colors.

Source

pub fn with_default() -> Channels

A new pair of channels set to black and using the default colors.

Source

pub fn from_rgb(fg_rgb: impl Into<Rgb>, bg_rgb: impl Into<Rgb>) -> Channels

A new pair of channels, using separate foreground and background colors.

Source

pub fn from_rgb_both(rgb: impl Into<Rgb>) -> Channels

A new pair of channels, using the same foreground and background colors.

Source

pub fn from_rgb_alpha( fg_rgb: impl Into<Rgb>, fg_alpha: impl Into<Alpha>, bg_rgb: impl Into<Rgb>, bg_alpha: impl Into<Alpha>, ) -> Channels

A new pair of channels, using separate foreground and background colors, and alpha.

Source

pub fn from_rgb_alpha_both( rgb: impl Into<Rgb>, alpha: impl Into<Alpha>, ) -> Channels

A new pair of channels, using the same foreground and background colors.

Source

pub fn combine(fg: impl Into<Channel>, bg: impl Into<Channel>) -> Channels

Combines two separate Channels into Channels.

Source§

impl Channels

§methods

Source

pub fn fg(&self) -> Channel

Gets the foreground channel.

Source

pub fn bg(&self) -> Channel

Gets the background channel.

Source

pub fn set_fg(&mut self, fg: impl Into<Channel>) -> Channels

Sets the foreground channel.

Source

pub fn set_bg(&mut self, bg: impl Into<Channel>) -> Channels

Sets the background channel.

Source

pub fn channels(&self) -> Channels

Gets the alpha and coloring bits as Channels.

Source

pub fn set_channels(&mut self, other: impl Into<Channels>) -> Channels

Sets the alpha and coloring bits from another Channels.

Source

pub fn reverse(&mut self) -> Self

Returns the Channels with the foreground and background’s color information swapped, but without touching the rest of the bits.

Alpha is retained unless it would lead to an illegal state: HighContrast, Transparent and Blend are taken to Opaque unless the new value is Rgb.

Trait Implementations§

Source§

impl Clone for Channels

Source§

fn clone(&self) -> Channels

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 Channels

Source§

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

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

impl Default for Channels

Source§

fn default() -> Channels

Returns the “default value” for a type. Read more
Source§

impl Display for Channels

Source§

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

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

impl From<&Channels> for (Channel, Channel)

Source§

fn from(c: &Channels) -> (Channel, Channel)

Converts to this type from the input type.
Source§

impl From<[[i16; 3]; 2]> for Channels

Source§

fn from(arr: [[i16; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[i32; 3]; 2]> for Channels

Source§

fn from(arr: [[i32; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[i64; 3]; 2]> for Channels

Source§

fn from(arr: [[i64; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[i8; 3]; 2]> for Channels

Source§

fn from(arr: [[i8; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[isize; 3]; 2]> for Channels

Source§

fn from(arr: [[isize; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[u16; 3]; 2]> for Channels

Source§

fn from(arr: [[u16; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[u32; 3]; 2]> for Channels

Source§

fn from(arr: [[u32; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[u64; 3]; 2]> for Channels

Source§

fn from(arr: [[u64; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[u8; 3]; 2]> for Channels

Source§

fn from(arr: [[u8; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[[usize; 3]; 2]> for Channels

Source§

fn from(arr: [[usize; 3]; 2]) -> Channels

New Channels from different foreground & background [[r, g, b], [r, g, b]]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[i16; 2]> for Channels

Source§

fn from(arr: [i16; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[i16; 3]> for Channels

Source§

fn from(arr: [i16; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[i16; 6]> for Channels

Source§

fn from(arr: [i16; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[i32; 2]> for Channels

Source§

fn from(arr: [i32; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[i32; 3]> for Channels

Source§

fn from(arr: [i32; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[i32; 6]> for Channels

Source§

fn from(arr: [i32; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[i64; 2]> for Channels

Source§

fn from(arr: [i64; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[i64; 3]> for Channels

Source§

fn from(arr: [i64; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[i64; 6]> for Channels

Source§

fn from(arr: [i64; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[i8; 2]> for Channels

Source§

fn from(arr: [i8; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[i8; 3]> for Channels

Source§

fn from(arr: [i8; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[i8; 6]> for Channels

Source§

fn from(arr: [i8; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[isize; 2]> for Channels

Source§

fn from(arr: [isize; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[isize; 3]> for Channels

Source§

fn from(arr: [isize; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[isize; 6]> for Channels

Source§

fn from(arr: [isize; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[u16; 2]> for Channels

Source§

fn from(arr: [u16; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[u16; 3]> for Channels

Source§

fn from(arr: [u16; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[u16; 6]> for Channels

Source§

fn from(arr: [u16; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[u32; 2]> for Channels

Source§

fn from(arr: [u32; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[u32; 3]> for Channels

Source§

fn from(arr: [u32; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[u32; 6]> for Channels

Source§

fn from(arr: [u32; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[u64; 2]> for Channels

Source§

fn from(arr: [u64; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[u64; 3]> for Channels

Source§

fn from(arr: [u64; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[u64; 6]> for Channels

Source§

fn from(arr: [u64; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[u8; 2]> for Channels

Source§

fn from(arr: [u8; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[u8; 3]> for Channels

Source§

fn from(arr: [u8; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[u8; 6]> for Channels

Source§

fn from(arr: [u8; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[usize; 2]> for Channels

Source§

fn from(arr: [usize; 2]) -> Channels

New Channels from a pair of [fg, bg] impl Into<Channel>’s.

Source§

impl From<[usize; 3]> for Channels

Source§

fn from(arr: [usize; 3]) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<[usize; 6]> for Channels

Source§

fn from(arr: [usize; 6]) -> Channels

New Channels from different foreground & background [r, g, b, r, g, b]).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((i16, i16, i16), (i16, i16, i16))> for Channels

Source§

fn from(tuple: ((i16, i16, i16), (i16, i16, i16))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((i32, i32, i32), (i32, i32, i32))> for Channels

Source§

fn from(tuple: ((i32, i32, i32), (i32, i32, i32))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((i64, i64, i64), (i64, i64, i64))> for Channels

Source§

fn from(tuple: ((i64, i64, i64), (i64, i64, i64))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((i8, i8, i8), (i8, i8, i8))> for Channels

Source§

fn from(tuple: ((i8, i8, i8), (i8, i8, i8))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((isize, isize, isize), (isize, isize, isize))> for Channels

Source§

fn from(tuple: ((isize, isize, isize), (isize, isize, isize))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((u16, u16, u16), (u16, u16, u16))> for Channels

Source§

fn from(tuple: ((u16, u16, u16), (u16, u16, u16))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((u32, u32, u32), (u32, u32, u32))> for Channels

Source§

fn from(tuple: ((u32, u32, u32), (u32, u32, u32))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((u64, u64, u64), (u64, u64, u64))> for Channels

Source§

fn from(tuple: ((u64, u64, u64), (u64, u64, u64))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((u8, u8, u8), (u8, u8, u8))> for Channels

Source§

fn from(tuple: ((u8, u8, u8), (u8, u8, u8))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<((usize, usize, usize), (usize, usize, usize))> for Channels

Source§

fn from(tuple: ((usize, usize, usize), (usize, usize, usize))) -> Channels

New Channels from different foreground & background ((r, g, b), (r, g, b)).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(i16, i16)> for Channels

Source§

fn from(tuple: (i16, i16)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(i16, i16, i16)> for Channels

Source§

fn from(tuple: (i16, i16, i16)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(i16, i16, i16, i16, i16, i16)> for Channels

Source§

fn from(tuple: (i16, i16, i16, i16, i16, i16)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(i32, i32)> for Channels

Source§

fn from(tuple: (i32, i32)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(i32, i32, i32)> for Channels

Source§

fn from(tuple: (i32, i32, i32)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(i32, i32, i32, i32, i32, i32)> for Channels

Source§

fn from(tuple: (i32, i32, i32, i32, i32, i32)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(i64, i64)> for Channels

Source§

fn from(tuple: (i64, i64)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(i64, i64, i64)> for Channels

Source§

fn from(tuple: (i64, i64, i64)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(i64, i64, i64, i64, i64, i64)> for Channels

Source§

fn from(tuple: (i64, i64, i64, i64, i64, i64)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(i8, i8)> for Channels

Source§

fn from(tuple: (i8, i8)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(i8, i8, i8)> for Channels

Source§

fn from(tuple: (i8, i8, i8)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(i8, i8, i8, i8, i8, i8)> for Channels

Source§

fn from(tuple: (i8, i8, i8, i8, i8, i8)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(isize, isize)> for Channels

Source§

fn from(tuple: (isize, isize)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(isize, isize, isize)> for Channels

Source§

fn from(tuple: (isize, isize, isize)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(isize, isize, isize, isize, isize, isize)> for Channels

Source§

fn from(tuple: (isize, isize, isize, isize, isize, isize)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(u16, u16)> for Channels

Source§

fn from(tuple: (u16, u16)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(u16, u16, u16)> for Channels

Source§

fn from(tuple: (u16, u16, u16)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(u16, u16, u16, u16, u16, u16)> for Channels

Source§

fn from(tuple: (u16, u16, u16, u16, u16, u16)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(u32, u32)> for Channels

Source§

fn from(tuple: (u32, u32)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(u32, u32, u32)> for Channels

Source§

fn from(tuple: (u32, u32, u32)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(u32, u32, u32, u32, u32, u32)> for Channels

Source§

fn from(tuple: (u32, u32, u32, u32, u32, u32)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(u64, u64)> for Channels

Source§

fn from(tuple: (u64, u64)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(u64, u64, u64)> for Channels

Source§

fn from(tuple: (u64, u64, u64)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(u64, u64, u64, u64, u64, u64)> for Channels

Source§

fn from(tuple: (u64, u64, u64, u64, u64, u64)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(u8, u8)> for Channels

Source§

fn from(tuple: (u8, u8)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(u8, u8, u8)> for Channels

Source§

fn from(tuple: (u8, u8, u8)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(u8, u8, u8, u8, u8, u8)> for Channels

Source§

fn from(tuple: (u8, u8, u8, u8, u8, u8)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(usize, usize)> for Channels

Source§

fn from(tuple: (usize, usize)) -> Channels

New Channels from a pair of (fg, bg) impl Into<Channel>’s.

Source§

impl From<(usize, usize, usize)> for Channels

Source§

fn from(tuple: (usize, usize, usize)) -> Channels

New Channels from same foreground & background (r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<(usize, usize, usize, usize, usize, usize)> for Channels

Source§

fn from(tuple: (usize, usize, usize, usize, usize, usize)) -> Channels

New Channels from different foreground & background (r, g, b, r, g, b).

Performs a saturating cast to [u8; 3], [u8; 3].

Source§

impl From<Channels> for (Channel, Channel)

Converts a Channels into a (fg, bg) Channel tuple.

Source§

fn from(c: Channels) -> (Channel, Channel)

Converts to this type from the input type.
Source§

impl From<Channels> for NcChannels

Source§

fn from(c: Channels) -> NcChannels

Converts to this type from the input type.
Source§

impl From<NcChannels> for Channels

Source§

fn from(nc: NcChannels) -> Channels

Converts to this type from the input type.
Source§

impl From<u64> for Channels

Source§

fn from(nc_u64: NcChannels_u64) -> Channels

Converts to this type from the input type.
Source§

impl PartialEq for Channels

Source§

fn eq(&self, other: &Channels) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Channels

Source§

impl Eq for Channels

Source§

impl StructuralPartialEq for Channels

Auto Trait Implementations§

Blanket Implementations§

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.