Struct epaint::text::text_layout::RowBreakCandidates
source · struct RowBreakCandidates {
space: Option<usize>,
cjk: Option<usize>,
pre_cjk: Option<usize>,
dash: Option<usize>,
punctuation: Option<usize>,
any: Option<usize>,
}
Expand description
Keeps track of good places to break a long row of text.
Will focus primarily on spaces, secondarily on things like -
Fields§
§space: Option<usize>
Breaking at
or other whitespace
is always the primary candidate.
cjk: Option<usize>
Logograms (single character representing a whole word) or kana (Japanese hiragana and katakana) are good candidates for line break.
pre_cjk: Option<usize>
Breaking anywhere before a CJK character is acceptable too.
dash: Option<usize>
Breaking at a dash is a super- good idea.
punctuation: Option<usize>
This is nicer for things like URLs, e.g. www. example.com.
any: Option<usize>
Breaking after just random character is some times necessary.
Implementations§
Trait Implementations§
source§impl Clone for RowBreakCandidates
impl Clone for RowBreakCandidates
source§fn clone(&self) -> RowBreakCandidates
fn clone(&self) -> RowBreakCandidates
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 Default for RowBreakCandidates
impl Default for RowBreakCandidates
source§fn default() -> RowBreakCandidates
fn default() -> RowBreakCandidates
Returns the “default value” for a type. Read more
impl Copy for RowBreakCandidates
Auto Trait Implementations§
impl Freeze for RowBreakCandidates
impl RefUnwindSafe for RowBreakCandidates
impl Send for RowBreakCandidates
impl Sync for RowBreakCandidates
impl Unpin for RowBreakCandidates
impl UnwindSafe for RowBreakCandidates
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§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
)