pub struct WidthPolicy { /* private fields */ }Implementations§
Source§impl WidthPolicy
impl WidthPolicy
pub fn new(char_width: fn(char) -> u32) -> Self
pub fn monospace_ascii(tab_width: u32) -> Self
pub fn cjk_grid(tab_width: u32) -> Self
pub fn with_tab_width(char_width: fn(char) -> u32, tab_width: u32) -> Self
pub fn tab_width(&self) -> Option<u32>
pub fn char_width(&self) -> fn(char) -> u32
pub fn advance_of(&self, ch: char) -> u32
pub fn text_width(&self, text: &str) -> u32
Trait Implementations§
Source§impl Clone for WidthPolicy
impl Clone for WidthPolicy
Source§fn clone(&self) -> WidthPolicy
fn clone(&self) -> WidthPolicy
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 Debug for WidthPolicy
impl Debug for WidthPolicy
impl Copy for WidthPolicy
Auto Trait Implementations§
impl Freeze for WidthPolicy
impl RefUnwindSafe for WidthPolicy
impl Send for WidthPolicy
impl Sync for WidthPolicy
impl Unpin for WidthPolicy
impl UnsafeUnpin for WidthPolicy
impl UnwindSafe for WidthPolicy
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