pub struct HorizontalLine<T> {
pub main: Option<T>,
pub intersection: Option<T>,
pub left: Option<T>,
pub right: Option<T>,
}
Expand description
A structure for a custom horizontal line.
Fields§
§main: Option<T>
Line character.
intersection: Option<T>
Line intersection character.
left: Option<T>
Left intersection character.
right: Option<T>
Right intersection character.
Implementations§
Source§impl<T> HorizontalLine<T>
impl<T> HorizontalLine<T>
Sourcepub const fn new(
main: Option<T>,
intersection: Option<T>,
left: Option<T>,
right: Option<T>,
) -> HorizontalLine<T>
pub const fn new( main: Option<T>, intersection: Option<T>, left: Option<T>, right: Option<T>, ) -> HorizontalLine<T>
Creates a new line.
Sourcepub const fn full(
main: T,
intersection: T,
left: T,
right: T,
) -> HorizontalLine<T>
pub const fn full( main: T, intersection: T, left: T, right: T, ) -> HorizontalLine<T>
Creates a new line.
Sourcepub const fn filled(val: T) -> HorizontalLine<T>where
T: Copy,
pub const fn filled(val: T) -> HorizontalLine<T>where
T: Copy,
Creates a new line.
Sourcepub const fn empty() -> HorizontalLine<T>
pub const fn empty() -> HorizontalLine<T>
Creates a new line.
Trait Implementations§
Source§impl<T> Clone for HorizontalLine<T>where
T: Clone,
impl<T> Clone for HorizontalLine<T>where
T: Clone,
Source§fn clone(&self) -> HorizontalLine<T>
fn clone(&self) -> HorizontalLine<T>
Returns a duplicate 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> Debug for HorizontalLine<T>where
T: Debug,
impl<T> Debug for HorizontalLine<T>where
T: Debug,
Source§impl<T> Default for HorizontalLine<T>where
T: Default,
impl<T> Default for HorizontalLine<T>where
T: Default,
Source§fn default() -> HorizontalLine<T>
fn default() -> HorizontalLine<T>
Returns the “default value” for a type. Read more
Source§impl<L, R, I> From<HorizontalLine<L, R, I>> for HorizontalLine<char>
impl<L, R, I> From<HorizontalLine<L, R, I>> for HorizontalLine<char>
Source§fn from(value: HorizontalLine<L, R, I>) -> Self
fn from(value: HorizontalLine<L, R, I>) -> Self
Converts to this type from the input type.
Source§impl<L, R, I> From<HorizontalLine<char>> for HorizontalLine<L, R, I>
impl<L, R, I> From<HorizontalLine<char>> for HorizontalLine<L, R, I>
Source§impl<T, B, I> From<VerticalLine<T, B, I>> for HorizontalLine<char>
impl<T, B, I> From<VerticalLine<T, B, I>> for HorizontalLine<char>
Source§fn from(value: VerticalLine<T, B, I>) -> Self
fn from(value: VerticalLine<T, B, I>) -> Self
Converts to this type from the input type.
Source§impl<T> Hash for HorizontalLine<T>where
T: Hash,
impl<T> Hash for HorizontalLine<T>where
T: Hash,
Source§impl<T> Ord for HorizontalLine<T>where
T: Ord,
impl<T> Ord for HorizontalLine<T>where
T: Ord,
Source§fn cmp(&self, other: &HorizontalLine<T>) -> Ordering
fn cmp(&self, other: &HorizontalLine<T>) -> 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> PartialEq for HorizontalLine<T>where
T: PartialEq,
impl<T> PartialEq for HorizontalLine<T>where
T: PartialEq,
Source§impl<T> PartialOrd for HorizontalLine<T>where
T: PartialOrd,
impl<T> PartialOrd for HorizontalLine<T>where
T: PartialOrd,
impl<T> Copy for HorizontalLine<T>where
T: Copy,
impl<T> Eq for HorizontalLine<T>where
T: Eq,
impl<T> StructuralPartialEq for HorizontalLine<T>
Auto Trait Implementations§
impl<T> Freeze for HorizontalLine<T>where
T: Freeze,
impl<T> RefUnwindSafe for HorizontalLine<T>where
T: RefUnwindSafe,
impl<T> Send for HorizontalLine<T>where
T: Send,
impl<T> Sync for HorizontalLine<T>where
T: Sync,
impl<T> Unpin for HorizontalLine<T>where
T: Unpin,
impl<T> UnwindSafe for HorizontalLine<T>where
T: 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