pub struct HorizontalLine<L, R, I> { /* private fields */ }
Expand description

A horizontal split line which can be used to set a border.

Implementations§

source§

impl HorizontalLine<(), (), ()>

source

pub const fn new(main: char) -> Self

Creates a new horizontal split line.

source§

impl<L, R, I> HorizontalLine<L, R, I>

source

pub const fn empty() -> Self

Creates a stub horizontal line.

source

pub const fn inherit<T, B, const HSIZE: usize, const VSIZE: usize>( style: Style<T, B, L, R, On, I, HSIZE, VSIZE> ) -> Self

Fetches vertical line from a style.

source

pub const fn inherit_top<T, B, H, V, const HSIZE: usize, const VSIZE: usize>( style: Style<On, B, L, R, H, I, HSIZE, VSIZE> ) -> Self

Fetches left vertical line from a style.

source

pub const fn inherit_bottom<T, B, H, V, const HSIZE: usize, const VSIZE: usize>( style: Style<T, On, L, R, I, V, HSIZE, VSIZE> ) -> Self

Fetches right vertical line from a style.

source§

impl HorizontalLine<On, On, On>

source

pub const fn full( main: char, intersection: char, left: char, right: char ) -> Self

Creates a new horizontal split line.

source

pub const fn filled(main: char) -> Self

Creates a new horizontal split line.

source§

impl<L, R, I> HorizontalLine<L, R, I>

source

pub const fn horizontal(self, c: char) -> HorizontalLine<L, R, I>

Set a horizontal character.

source

pub const fn intersection(self, c: char) -> HorizontalLine<L, R, On>

Set a vertical intersection character.

source

pub const fn left(self, c: char) -> HorizontalLine<On, R, I>

Set a left character.

source

pub const fn right(self, c: char) -> HorizontalLine<L, On, I>

Set a right character.

source§

impl<L, R, I> HorizontalLine<L, R, I>

source

pub const fn get_horizontal(&self) -> char

Get a horizontal character.

source

pub const fn into_inner(&self) -> Line<char>

Get a general structure of line.

source§

impl<L, R> HorizontalLine<L, R, On>

source

pub const fn get_intersection(&self) -> char

Set a vertical intersection character.

source

pub const fn remove_intersection(self) -> HorizontalLine<L, R, ()>

Remove a vertical intersection character.

source§

impl<R, I> HorizontalLine<On, R, I>

source

pub const fn get_left(&self) -> char

Get a left character.

source

pub const fn remove_left(self) -> HorizontalLine<(), R, I>

Remove a horizontal left character.

source§

impl<L, I> HorizontalLine<L, On, I>

source

pub const fn get_right(&self) -> char

Get a right character.

source

pub const fn remove_right(self) -> HorizontalLine<I, (), I>

Remove a horizontal right character.

Trait Implementations§

source§

impl<L: Clone, R: Clone, I: Clone> Clone for HorizontalLine<L, R, I>

source§

fn clone(&self) -> HorizontalLine<L, R, I>

Returns a copy 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<L: Debug, R: Debug, I: Debug> Debug for HorizontalLine<L, R, I>

source§

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

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

impl<L: Default, R: Default, I: Default> Default for HorizontalLine<L, R, I>

source§

fn default() -> HorizontalLine<L, R, I>

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

impl<L, R, I> From<HorizontalLine<L, R, I>> for HorizontalLine<char>

source§

fn from(value: HorizontalLine<L, R, I>) -> Self

Converts to this type from the input type.
source§

impl<T, B, I> From<HorizontalLine<T, B, I>> for VerticalLine<char>

source§

fn from(value: HorizontalLine<T, B, I>) -> Self

Converts to this type from the input type.
source§

impl<L, R, I> From<HorizontalLine<char>> for HorizontalLine<L, R, I>

source§

fn from(value: Line<char>) -> Self

Converts to this type from the input type.
source§

impl<L: Hash, R: Hash, I: Hash> Hash for HorizontalLine<L, R, I>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<L: Ord, R: Ord, I: Ord> Ord for HorizontalLine<L, R, I>

source§

fn cmp(&self, other: &HorizontalLine<L, R, I>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<L: PartialEq, R: PartialEq, I: PartialEq> PartialEq for HorizontalLine<L, R, I>

source§

fn eq(&self, other: &HorizontalLine<L, R, I>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<L: PartialOrd, R: PartialOrd, I: PartialOrd> PartialOrd for HorizontalLine<L, R, I>

source§

fn partial_cmp(&self, other: &HorizontalLine<L, R, I>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<L: Copy, R: Copy, I: Copy> Copy for HorizontalLine<L, R, I>

source§

impl<L: Eq, R: Eq, I: Eq> Eq for HorizontalLine<L, R, I>

source§

impl<L, R, I> StructuralEq for HorizontalLine<L, R, I>

source§

impl<L, R, I> StructuralPartialEq for HorizontalLine<L, R, I>

Auto Trait Implementations§

§

impl<L, R, I> RefUnwindSafe for HorizontalLine<L, R, I>

§

impl<L, R, I> Send for HorizontalLine<L, R, I>
where I: Send, L: Send, R: Send,

§

impl<L, R, I> Sync for HorizontalLine<L, R, I>
where I: Sync, L: Sync, R: Sync,

§

impl<L, R, I> Unpin for HorizontalLine<L, R, I>
where I: Unpin, L: Unpin, R: Unpin,

§

impl<L, R, I> UnwindSafe for HorizontalLine<L, R, I>
where I: UnwindSafe, L: UnwindSafe, R: UnwindSafe,

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> 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,

§

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>,

§

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>,

§

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.