pub struct TextBlock { /* private fields */ }Implementations§
Source§impl TextBlock
impl TextBlock
pub fn new( width_px: f64, font_size_px: f64, line_height_px: f64, character_count: usize, ) -> Result<Self, TextBlockError>
pub fn estimated_characters_per_line( &self, average_character_width_px: f64, ) -> Result<f64, TextBlockError>
pub fn estimated_line_count( &self, average_character_width_px: f64, ) -> Result<usize, TextBlockError>
pub fn estimated_height_px( &self, average_character_width_px: f64, ) -> Result<f64, TextBlockError>
Trait Implementations§
impl Copy for TextBlock
impl StructuralPartialEq for TextBlock
Auto Trait Implementations§
impl Freeze for TextBlock
impl RefUnwindSafe for TextBlock
impl Send for TextBlock
impl Sync for TextBlock
impl Unpin for TextBlock
impl UnsafeUnpin for TextBlock
impl UnwindSafe for TextBlock
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