Skip to main content

SelectableText

Struct SelectableText 

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

Implementations§

Source§

impl SelectableText

Source

pub fn new(value: impl Into<Cow<'static, str>>) -> Self

Source

pub fn max_lines(self, max_lines: impl Into<Option<usize>>) -> Self

Source

pub fn line_height(self, line_height: impl Into<Option<f32>>) -> Self

Trait Implementations§

Source§

impl AccessibilityExt for SelectableText

Source§

fn get_accessibility_data(&mut self) -> &mut AccessibilityData

§

fn accessibility(self, accessibility: AccessibilityData) -> Self

§

fn a11y_id(self, a11y_id: impl Into<Option<NodeId>>) -> Self

§

fn a11y_focusable(self, a11y_focusable: impl Into<Focusable>) -> Self

§

fn a11y_auto_focus(self, a11y_auto_focus: impl Into<bool>) -> Self

§

fn a11y_member_of(self, a11y_member_of: impl Into<NodeId>) -> Self

§

fn a11y_role(self, a11y_role: impl Into<Role>) -> Self

§

fn a11y_alt(self, value: impl Into<Box<str>>) -> Self

§

fn a11y_builder(self, with: impl FnOnce(&mut Node)) -> Self

Source§

impl Clone for SelectableText

Source§

fn clone(&self) -> SelectableText

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Component for SelectableText

Source§

fn render(&self) -> impl IntoElement

Source§

fn render_key(&self) -> DiffKey

Source§

impl ContainerExt for SelectableText

§

fn position(self, position: impl Into<Position>) -> Self

§

fn padding(self, padding: impl Into<Gaps>) -> Self

§

fn margin(self, margin: impl Into<Gaps>) -> Self

§

fn min_width(self, minimum_width: impl Into<Size>) -> Self

§

fn min_height(self, minimum_height: impl Into<Size>) -> Self

§

fn max_width(self, maximum_width: impl Into<Size>) -> Self

§

fn max_height(self, maximum_height: impl Into<Size>) -> Self

§

fn visible_width(self, visible_width: impl Into<VisibleSize>) -> Self

§

fn visible_height(self, visible_height: impl Into<VisibleSize>) -> Self

Source§

impl KeyExt for SelectableText

Source§

fn write_key(&mut self) -> &mut DiffKey

§

fn key(self, key: impl Hash) -> Self

Source§

impl LayoutExt for SelectableText

Source§

fn get_layout(&mut self) -> &mut LayoutData

§

fn layout(self, layout: LayoutData) -> Self

Source§

impl PartialEq for SelectableText

Source§

fn eq(&self, other: &SelectableText) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TextStyleExt for SelectableText

Source§

fn get_text_style_data(&mut self) -> &mut TextStyleData

§

fn text_style(self, data: TextStyleData) -> Self

§

fn color(self, color: impl Into<Color>) -> Self

§

fn text_align(self, text_align: impl Into<TextAlign>) -> Self

§

fn font_size(self, font_size: impl Into<FontSize>) -> Self

§

fn font_family(self, font_family: impl Into<Cow<'static, str>>) -> Self

§

fn font_slant(self, font_slant: impl Into<FontSlant>) -> Self

§

fn font_weight(self, font_weight: impl Into<FontWeight>) -> Self

§

fn font_width(self, font_width: impl Into<FontWidth>) -> Self

§

fn text_height(self, text_height: impl Into<TextHeightBehavior>) -> Self

§

fn text_overflow(self, text_overflow: impl Into<TextOverflow>) -> Self

§

fn text_shadow(self, text_shadow: impl Into<TextShadow>) -> Self

§

fn text_decoration(self, text_decoration: impl Into<TextDecoration>) -> Self

Source§

impl StructuralPartialEq for SelectableText

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> ComponentKey for T
where T: Component,

§

fn default_key(&self) -> DiffKey

§

impl<T> ComponentProps for T
where T: Any + PartialEq,

§

fn changed(&self, other: &(dyn ComponentProps + 'static)) -> bool

§

impl<T> ContainerSizeExt for T
where T: ContainerExt,

§

fn width(self, width: impl Into<Size>) -> Self

§

fn height(self, height: impl Into<Size>) -> Self

§

fn expanded(self) -> Self

Expand both width and height using [Size::fill()].
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoElement for T
where T: Into<Element>,

§

fn into_element(self) -> Element

§

impl<T> IntoReadable<T> for T
where T: 'static,

§

fn into_readable(self) -> Readable<T>

§

impl<T> MaybeExt for T
where T: Component,

§

fn maybe(self, bool: impl Into<bool>, then: impl FnOnce(Self) -> Self) -> Self

§

fn map<T>(self, data: Option<T>, then: impl FnOnce(Self, T) -> Self) -> Self

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

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