Struct embedded_text::alignment::justified::JustifiedSpaceConfig
source · pub struct JustifiedSpaceConfig { /* private fields */ }Expand description
Internal state information used to store width of whitespace characters when rendering fully justified text.
The fully justified renderer works by calculating the width of whitespace characters for the current line. Due to integer arithmetic, there can be remainder pixels when a single space width is used. This struct stores two width values so the whole line will always (at least if there’s a space in the line) take up all available space.
Trait Implementations§
source§impl Clone for JustifiedSpaceConfig
impl Clone for JustifiedSpaceConfig
source§fn clone(&self) -> JustifiedSpaceConfig
fn clone(&self) -> JustifiedSpaceConfig
Returns a copy 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 JustifiedSpaceConfig
impl Debug for JustifiedSpaceConfig
source§impl SpaceConfig for JustifiedSpaceConfig
impl SpaceConfig for JustifiedSpaceConfig
source§fn starting_spaces(&self) -> bool
fn starting_spaces(&self) -> bool
Render spaces at the start of a line
source§fn ending_spaces(&self) -> bool
fn ending_spaces(&self) -> bool
Render spaces at the end of a line
source§fn next_space_width(&mut self) -> u32
fn next_space_width(&mut self) -> u32
Get the width of the next space and advance
source§fn peek_next_width(&self, whitespace_count: u32) -> u32
fn peek_next_width(&self, whitespace_count: u32) -> u32
Look at the size of next n spaces, without advancing
impl Copy for JustifiedSpaceConfig
Auto Trait Implementations§
impl Freeze for JustifiedSpaceConfig
impl RefUnwindSafe for JustifiedSpaceConfig
impl Send for JustifiedSpaceConfig
impl Sync for JustifiedSpaceConfig
impl Unpin for JustifiedSpaceConfig
impl UnwindSafe for JustifiedSpaceConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)