pub struct Text(_);
Expand description
The text backend for the system.
Trait Implementations§
source§impl Text for Text
impl Text for Text
§type TextLayoutBuilder = TextLayoutBuilder
type TextLayoutBuilder = TextLayoutBuilder
A concrete type that implements the
TextLayoutBuilder
trait.§type TextLayout = TextLayout
type TextLayout = TextLayout
A concrete type that implements the
TextLayout
trait.source§fn font_family(&mut self, family_name: &str) -> Option<FontFamily>
fn font_family(&mut self, family_name: &str) -> Option<FontFamily>
Query the platform for a font with a given name, and return a
FontFamily
object corresponding to that font, if it is found. Read moresource§fn load_font(&mut self, data: &[u8]) -> Result<FontFamily, Error>
fn load_font(&mut self, data: &[u8]) -> Result<FontFamily, Error>
Load the provided font data and make it available for use. Read more
source§fn new_text_layout(&mut self, text: impl TextStorage) -> Self::TextLayoutBuilder
fn new_text_layout(&mut self, text: impl TextStorage) -> Self::TextLayoutBuilder
Create a new layout object to display the provided
text
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Text
impl !Send for Text
impl !Sync for Text
impl Unpin for Text
impl !UnwindSafe for Text
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.