pub struct StyleRun {
pub start: usize,
pub end: usize,
pub bold: bool,
pub italic: bool,
pub link: bool,
}Expand description
A run of emphasised text inside a chapter, in chapter-text byte offsets.
Held alongside the text rather than inside it. Row is a Slint struct
carrying flat text, and threading styled spans through it would mean
changing the .slint type, every construction site, and the justification
and TTS-highlight code that keys off row ranges. Rows already carry byte
ranges, so emphasis can simply be looked up by offset at draw time.
Fields§
§start: usize§end: usize§bold: bool§italic: bool§link: boolTrait Implementations§
Source§impl<'de> Deserialize<'de> for StyleRun
impl<'de> Deserialize<'de> for StyleRun
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StyleRun
impl StructuralPartialEq for StyleRun
Auto Trait Implementations§
impl Freeze for StyleRun
impl RefUnwindSafe for StyleRun
impl Send for StyleRun
impl Sync for StyleRun
impl Unpin for StyleRun
impl UnsafeUnpin for StyleRun
impl UnwindSafe for StyleRun
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.