Skip to main content

Text

Struct Text 

Source
pub struct Text { /* private fields */ }

Implementations§

Source§

impl Text

Source

pub fn mark(self, name: &'static str) -> Self

Name a part of an explicit static plan; not a DOM id or data key.

Source

pub fn backend_options<T: 'static>(self, value: T) -> Self

Source§

impl Text

Source

pub fn class(self, value: impl Into<Vary<String>>) -> Self

Set the complete whitespace-separated class list (last call wins).

Source

pub fn class_fn(self, read: impl FnMut() -> String + 'static) -> Self

Compute one property directly in its pure Binding.

Source

pub fn style_fn(self, read: impl FnMut() -> Style + 'static) -> Self

Source

pub fn style(self, value: impl Into<Vary<Style>>) -> Self

Source

pub fn name(self, value: impl Into<Vary<String>>) -> Self

Accessible name. Plain inline/paragraph text uses content; decorative images have no accessible name. A named generic View becomes an accessible group without changing its layout box.

Source

pub fn focus(self, mode: impl Into<Vary<FocusMode>>) -> Self

Source

pub fn semantics(self, value: impl Into<Vary<Option<Box<Semantics>>>>) -> Self

Finite composite-widget state and document-scoped relations.

Source

pub fn on(self, kind: EventKind, handler: impl FnMut(Event) + 'static) -> Self

Source

pub fn node_ref(self, reference: Cage<Option<NodeId>>) -> Self

Publish the mounted semantic identity and clear it on retirement.

Source§

impl Text

Source

pub fn content_fn(self, read: impl FnMut() -> String + 'static) -> Self

Source

pub fn content(self, value: impl Into<Vary<String>>) -> Self

Source

pub fn kind(self, value: TextKind) -> Self

Source

pub fn selectable(self, value: impl Into<Vary<bool>>) -> Self

Trait Implementations§

Source§

impl Default for Text

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Widget for Text

Source§

fn build(&mut self, scope: &Scope) -> Result

Source§

fn mount(self, parent: &Scope) -> Result<Mounted>
where Self: Sized,

Source§

fn show_in(self, parent: &Scope) -> Result
where Self: Sized,

Auto Trait Implementations§

§

impl !RefUnwindSafe for Text

§

impl !Send for Text

§

impl !Sync for Text

§

impl !UnwindSafe for Text

§

impl Forget for Text

§

impl Freeze for Text

§

impl Unpin for Text

§

impl UnsafeUnpin for Text

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<W> IntoChildren for W
where W: Widget,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.