pub struct ScrollbarGlyphs { /* private fields */ }Expand description
The four glyphs used along one scrollbar orientation.
The thumb is required. Track and endpoint glyphs are optional, allowing a presentation to range from a conventional arrowed rail to a thumb-only indicator. Every present glyph must be exactly one printable, one-cell grapheme.
Implementations§
Source§impl ScrollbarGlyphs
impl ScrollbarGlyphs
Sourcepub fn new(thumb: impl Into<String>) -> Self
pub fn new(thumb: impl Into<String>) -> Self
Creates a thumb-only glyph set.
§Panics
Panics unless thumb is exactly one printable, one-cell grapheme.
Sourcepub fn track(self, track: Option<&str>) -> Self
pub fn track(self, track: Option<&str>) -> Self
Replaces or removes the track glyph.
§Panics
Panics unless a present glyph is exactly one printable, one-cell grapheme.
Sourcepub fn begin(self, begin: Option<&str>) -> Self
pub fn begin(self, begin: Option<&str>) -> Self
Replaces or removes the beginning glyph.
§Panics
Panics unless a present glyph is exactly one printable, one-cell grapheme.
Sourcepub fn end(self, end: Option<&str>) -> Self
pub fn end(self, end: Option<&str>) -> Self
Replaces or removes the ending glyph.
§Panics
Panics unless a present glyph is exactly one printable, one-cell grapheme.
pub fn get_thumb(&self) -> &str
pub fn get_track(&self) -> Option<&str>
pub fn get_begin(&self) -> Option<&str>
pub fn get_end(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for ScrollbarGlyphs
impl Clone for ScrollbarGlyphs
Source§fn clone(&self) -> ScrollbarGlyphs
fn clone(&self) -> ScrollbarGlyphs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScrollbarGlyphs
impl Debug for ScrollbarGlyphs
Source§impl Hash for ScrollbarGlyphs
impl Hash for ScrollbarGlyphs
Source§impl PartialEq for ScrollbarGlyphs
impl PartialEq for ScrollbarGlyphs
Source§fn eq(&self, other: &ScrollbarGlyphs) -> bool
fn eq(&self, other: &ScrollbarGlyphs) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ScrollbarGlyphs
impl StructuralPartialEq for ScrollbarGlyphs
Auto Trait Implementations§
impl Freeze for ScrollbarGlyphs
impl RefUnwindSafe for ScrollbarGlyphs
impl Send for ScrollbarGlyphs
impl Sync for ScrollbarGlyphs
impl Unpin for ScrollbarGlyphs
impl UnsafeUnpin for ScrollbarGlyphs
impl UnwindSafe for ScrollbarGlyphs
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