pub struct RoundedDashedBorder(pub Borders);Expand description
A dashed border with rounded corners.
This is a wrapper around Borders with Deref and DerefMut implementations
for convenient access to the underlying Borders configuration.
§Examples
use ratatui_garnish::border::{Borders, RoundedDashedBorder};
let border = RoundedDashedBorder::default();
let custom = RoundedDashedBorder::new(Borders::TOP | Borders::BOTTOM);Tuple Fields§
§0: BordersImplementations§
Methods from Deref<Target = Borders>§
pub const NONE: Self
pub const TOP: Self
pub const RIGHT: Self
pub const BOTTOM: Self
pub const LEFT: Self
pub const ALL: Self
Sourcepub fn bits(&self) -> u8
pub fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub fn intersects(&self, other: Self) -> bool
pub fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub fn contains(&self, other: Self) -> bool
pub fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub fn iter(&self) -> Iter<Borders>
pub fn iter(&self) -> Iter<Borders>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub fn iter_names(&self) -> IterNames<Borders>
pub fn iter_names(&self) -> IterNames<Borders>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Border for RoundedDashedBorder
impl Border for RoundedDashedBorder
Source§fn get_borders(&self) -> Borders
fn get_borders(&self) -> Borders
Source§fn get_border_set(&self) -> BorderSet
fn get_border_set(&self) -> BorderSet
Source§fn render_right(&self, area: Rect, buffer: &mut Buffer, symbol: char)
fn render_right(&self, area: Rect, buffer: &mut Buffer, symbol: char)
Source§impl Clone for RoundedDashedBorder
impl Clone for RoundedDashedBorder
Source§fn clone(&self) -> RoundedDashedBorder
fn clone(&self) -> RoundedDashedBorder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RoundedDashedBorder
impl Debug for RoundedDashedBorder
Source§impl Default for RoundedDashedBorder
impl Default for RoundedDashedBorder
Source§impl Deref for RoundedDashedBorder
impl Deref for RoundedDashedBorder
Source§impl DerefMut for RoundedDashedBorder
impl DerefMut for RoundedDashedBorder
Source§impl<'a, W> Extend<RoundedDashedBorder> for GarnishedStatefulWidget<'a, W>
impl<'a, W> Extend<RoundedDashedBorder> for GarnishedStatefulWidget<'a, W>
Source§fn extend<A: IntoIterator<Item = RoundedDashedBorder>>(&mut self, iter: A)
fn extend<A: IntoIterator<Item = RoundedDashedBorder>>(&mut self, iter: A)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<'a, W> Extend<RoundedDashedBorder> for GarnishedWidget<'a, W>
impl<'a, W> Extend<RoundedDashedBorder> for GarnishedWidget<'a, W>
Source§fn extend<A: IntoIterator<Item = RoundedDashedBorder>>(&mut self, iter: A)
fn extend<A: IntoIterator<Item = RoundedDashedBorder>>(&mut self, iter: A)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<'a> Extend<RoundedDashedBorder> for Garnishes<'a>
impl<'a> Extend<RoundedDashedBorder> for Garnishes<'a>
Source§fn extend<A: IntoIterator<Item = RoundedDashedBorder>>(&mut self, iter: A)
fn extend<A: IntoIterator<Item = RoundedDashedBorder>>(&mut self, iter: A)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<'a> From<RoundedDashedBorder> for Garnish<'a>
impl<'a> From<RoundedDashedBorder> for Garnish<'a>
Source§fn from(value: RoundedDashedBorder) -> Self
fn from(value: RoundedDashedBorder) -> Self
Source§impl Hash for RoundedDashedBorder
impl Hash for RoundedDashedBorder
Source§impl PartialEq for RoundedDashedBorder
impl PartialEq for RoundedDashedBorder
impl Copy for RoundedDashedBorder
impl Eq for RoundedDashedBorder
impl StructuralPartialEq for RoundedDashedBorder
Auto Trait Implementations§
impl Freeze for RoundedDashedBorder
impl RefUnwindSafe for RoundedDashedBorder
impl Send for RoundedDashedBorder
impl Sync for RoundedDashedBorder
impl Unpin for RoundedDashedBorder
impl UnwindSafe for RoundedDashedBorder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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