pub struct TextArea { /* private fields */ }Expand description
A multi-line text input.
Implementations§
Source§impl TextArea
impl TextArea
Sourcepub fn bound(state: &TextEditor) -> Self
pub fn bound(state: &TextEditor) -> Self
Create a new text area bound to a TextEditor state bundle.
Sourcepub fn placeholder(self, placeholder: impl Into<Arc<str>>) -> Self
pub fn placeholder(self, placeholder: impl Into<Arc<str>>) -> Self
Set placeholder text (shown when empty).
Sourcepub fn anchor(self, anchor: Option<usize>) -> Self
pub fn anchor(self, anchor: Option<usize>) -> Self
Set selection anchor position (byte index). When set, text between anchor and cursor is selected.
Sourcepub fn bind(self, state: &TextEditor) -> Self
pub fn bind(self, state: &TextEditor) -> Self
Bind the text area’s value, cursor, and anchor from a TextEditor state bundle.
Sourcepub fn line_numbers(self, show: bool) -> Self
pub fn line_numbers(self, show: bool) -> Self
Show line numbers.
Sourcepub fn line_number_mode(self, mode: TextAreaLineNumberMode) -> Self
pub fn line_number_mode(self, mode: TextAreaLineNumberMode) -> Self
Set line-number display mode for the built-in gutter.
Use TextAreaLineNumberMode::Relative for Vim-style relative numbers:
the cursor’s logical line shows its absolute number, while lines above
and below show their distance from the cursor line.
Sourcepub fn min_line_number_width(self, width: u8) -> Self
pub fn min_line_number_width(self, width: u8) -> Self
Set minimum line number width (number of digits to reserve).
Sourcepub fn color_strategy(
self,
strategy: impl TextAreaColorStrategy + 'static,
) -> Self
pub fn color_strategy( self, strategy: impl TextAreaColorStrategy + 'static, ) -> Self
Set text coloring strategy.
Sourcepub fn language(self, language: impl Into<Arc<str>>) -> Self
pub fn language(self, language: impl Into<Arc<str>>) -> Self
Set language identifier for coloring strategies.
Sourcepub fn language_from_path(self, path: impl AsRef<Path>) -> Self
pub fn language_from_path(self, path: impl AsRef<Path>) -> Self
Set language identifier by resolving from a file path’s extension or name.
Uses the default syntect syntax definitions. If no syntax matches the path, the language remains unset (plain text fallback). TypeScript/TSX paths fall back to JavaScript/JSX-compatible syntaxes when the default set does not provide exact grammars.
Sourcepub fn theme(self, theme: impl Into<Arc<str>>) -> Self
pub fn theme(self, theme: impl Into<Arc<str>>) -> Self
Set theme identifier for coloring strategies.
Sourcepub fn with_syntax(
self,
language: impl Into<Arc<str>>,
theme: impl Into<Arc<str>>,
) -> Self
pub fn with_syntax( self, language: impl Into<Arc<str>>, theme: impl Into<Arc<str>>, ) -> Self
Enable syntect-based syntax highlighting with default strategy.
Sourcepub fn with_syntax_bg(
self,
language: impl Into<Arc<str>>,
theme: impl Into<Arc<str>>,
) -> Self
pub fn with_syntax_bg( self, language: impl Into<Arc<str>>, theme: impl Into<Arc<str>>, ) -> Self
Enable syntect-based syntax highlighting with theme background colors.
Sourcepub fn with_syntax_custom_theme(
self,
language: impl Into<Arc<str>>,
theme_name: impl Into<Arc<str>>,
tm_theme_xml: impl AsRef<str>,
) -> Result<Self>
pub fn with_syntax_custom_theme( self, language: impl Into<Arc<str>>, theme_name: impl Into<Arc<str>>, tm_theme_xml: impl AsRef<str>, ) -> Result<Self>
Enable syntect-based syntax highlighting with a custom theme string.
Sourcepub fn with_syntax_custom_theme_bytes(
self,
language: impl Into<Arc<str>>,
theme_name: impl Into<Arc<str>>,
bytes: impl AsRef<[u8]>,
) -> Result<Self>
pub fn with_syntax_custom_theme_bytes( self, language: impl Into<Arc<str>>, theme_name: impl Into<Arc<str>>, bytes: impl AsRef<[u8]>, ) -> Result<Self>
Enable syntect-based syntax highlighting with custom theme bytes.
Sourcepub fn with_syntax_custom_theme_from_file(
self,
language: impl Into<Arc<str>>,
theme_name: impl Into<Arc<str>>,
path: impl AsRef<Path>,
) -> Result<Self>
pub fn with_syntax_custom_theme_from_file( self, language: impl Into<Arc<str>>, theme_name: impl Into<Arc<str>>, path: impl AsRef<Path>, ) -> Result<Self>
Enable syntect-based syntax highlighting with a custom theme file.
Sourcepub fn with_syntax_strategy(
self,
strategy: SyntectStrategy,
language: impl Into<Arc<str>>,
theme: impl Into<Arc<str>>,
) -> Self
pub fn with_syntax_strategy( self, strategy: SyntectStrategy, language: impl Into<Arc<str>>, theme: impl Into<Arc<str>>, ) -> Self
Enable syntect-based syntax highlighting with a custom strategy.
Sourcepub fn hover_style(self, style: Style) -> Self
pub fn hover_style(self, style: Style) -> Self
Set style when hovered.
Sourcepub fn extend_hover_style(self, style: Style) -> Self
pub fn extend_hover_style(self, style: Style) -> Self
Extend the active theme’s hover style with additional fields.
Sourcepub fn inherit_hover_style(self) -> Self
pub fn inherit_hover_style(self) -> Self
Inherit hover style from the active theme.
Sourcepub fn hover_style_slot(self, slot: StyleSlot) -> Self
pub fn hover_style_slot(self, slot: StyleSlot) -> Self
Set hover style slot directly for composite forwarding.
Sourcepub fn focus_style(self, style: Style) -> Self
pub fn focus_style(self, style: Style) -> Self
Set focus chrome style.
Sourcepub fn extend_focus_style(self, style: Style) -> Self
pub fn extend_focus_style(self, style: Style) -> Self
Extend the active theme’s focus style with additional fields.
Sourcepub fn inherit_focus_style(self) -> Self
pub fn inherit_focus_style(self) -> Self
Inherit focus style from the active theme.
Sourcepub fn focus_style_slot(self, slot: StyleSlot) -> Self
pub fn focus_style_slot(self, slot: StyleSlot) -> Self
Set focus style slot directly for composite forwarding.
Sourcepub fn focus_content_style(self, style: Style) -> Self
pub fn focus_content_style(self, style: Style) -> Self
Set focused content text style.
Sourcepub fn hover_border_style(self, border_style: BorderStyle) -> Self
pub fn hover_border_style(self, border_style: BorderStyle) -> Self
Set border style when hovered.
Sourcepub fn caret_shape(self, shape: CaretShape) -> Self
pub fn caret_shape(self, shape: CaretShape) -> Self
Set caret shape.
Sourcepub fn caret_color(self, color: Color) -> Self
pub fn caret_color(self, color: Color) -> Self
Set caret color (only used for block caret rendering).
Sourcepub fn selection_style(self, style: Style) -> Self
pub fn selection_style(self, style: Style) -> Self
Set selection highlight style.
Sourcepub fn extend_selection_style(self, style: Style) -> Self
pub fn extend_selection_style(self, style: Style) -> Self
Extend the active theme’s selection style with additional fields.
Sourcepub fn inherit_selection_style(self) -> Self
pub fn inherit_selection_style(self) -> Self
Inherit selection style from the active theme.
Sourcepub fn selection_style_slot(self, slot: StyleSlot) -> Self
pub fn selection_style_slot(self, slot: StyleSlot) -> Self
Set selection style slot directly for composite forwarding.
Sourcepub fn show_selection_when_unfocused(self, show: bool) -> Self
pub fn show_selection_when_unfocused(self, show: bool) -> Self
Show the active selection range while the text area is unfocused.
Enabled by default so keyboard/programmatic focus changes preserve the
visible selection, matching DocumentView.
Pass false to hide inactive selections.
Sourcepub fn unfocused_selection_style(self, style: Style) -> Self
pub fn unfocused_selection_style(self, style: Style) -> Self
Set selection highlight style while unfocused.
Sourcepub fn inherit_unfocused_selection_style(self) -> Self
pub fn inherit_unfocused_selection_style(self) -> Self
Inherit unfocused selection style from the active theme.
Sourcepub fn unfocused_selection_style_slot(self, slot: StyleSlot) -> Self
pub fn unfocused_selection_style_slot(self, slot: StyleSlot) -> Self
Set unfocused selection style slot directly for composite forwarding.
Sourcepub fn placeholder_style(self, style: Style) -> Self
pub fn placeholder_style(self, style: Style) -> Self
Set placeholder style.
Sourcepub fn focus_placeholder_style(self, style: Style) -> Self
pub fn focus_placeholder_style(self, style: Style) -> Self
Set placeholder style when focused.
Sourcepub fn line_number_style(self, style: Style) -> Self
pub fn line_number_style(self, style: Style) -> Self
Set line number style.
Sourcepub fn border_style(self, style: BorderStyle) -> Self
pub fn border_style(self, style: BorderStyle) -> Self
Set border style.
Sourcepub fn on_change(self, cb: Callback<TextAreaEvent>) -> Self
pub fn on_change(self, cb: Callback<TextAreaEvent>) -> Self
Set on-change callback.
Sourcepub fn on_edit(self, cb: Callback<TextEditEvent>) -> Self
pub fn on_edit(self, cb: Callback<TextEditEvent>) -> Self
Set on-edit callback.
Sourcepub fn on_editor_state_change(
self,
cb: Callback<TextAreaStateChangeEvent>,
) -> Self
pub fn on_editor_state_change( self, cb: Callback<TextAreaStateChangeEvent>, ) -> Self
Set a single reason-tagged editor-state callback.
Sourcepub fn on_click(self, cb: Callback<MouseEvent>) -> Self
pub fn on_click(self, cb: Callback<MouseEvent>) -> Self
Set on-click callback.
Sourcepub fn on_key(self, handler: KeyHandler) -> Self
pub fn on_key(self, handler: KeyHandler) -> Self
Set on-key handler.
Sourcepub fn key_interceptor(self, handler: KeyHandler) -> Self
pub fn key_interceptor(self, handler: KeyHandler) -> Self
Set a pre-insertion key interceptor.
This handler runs after clipboard shortcuts but before newline insertion,
tab expansion, or regular text editing. If it returns true, the key is
consumed and neither the editor nor on_key will fire.
Sourcepub fn clear_bindings(self, bindings: KeyBindings) -> Self
pub fn clear_bindings(self, bindings: KeyBindings) -> Self
Set widget-level single-key bindings that clear the text area.
Multi-step chord entries in bindings are ignored by the per-key text area handler.
Sourcepub fn vim_motions(self, enabled: bool) -> Self
pub fn vim_motions(self, enabled: bool) -> Self
Enable or disable TextArea-only Vim-style modal motions.
Disabled by default. When enabled, the TextArea starts in normal mode.
Sourcepub fn vim_keymap(self, keymap: TextAreaVimKeymap) -> Self
pub fn vim_keymap(self, keymap: TextAreaVimKeymap) -> Self
Set widget-local Vim key remaps.
Remaps are only applied while Vim motions are enabled and the TextArea is not in insert mode. They translate matching keys to canonical Vim command characters before command dispatch.
Sourcepub fn vim_config(self, config: TextAreaVimConfig) -> Self
pub fn vim_config(self, config: TextAreaVimConfig) -> Self
Set Vim-specific rendering options such as search feedback and current-line highlighting.
Sourcepub fn vim_current_line_highlight(
self,
mode: TextAreaVimCurrentLineHighlight,
) -> Self
pub fn vim_current_line_highlight( self, mode: TextAreaVimCurrentLineHighlight, ) -> Self
Convenience builder for Vim current-line highlighting.
Pass TextAreaVimCurrentLineHighlight::Full to include the gutter and
line numbers, or TextAreaVimCurrentLineHighlight::Content to affect
only the text content area.
Sourcepub fn highlight_vim_current_line(self, enabled: bool) -> Self
pub fn highlight_vim_current_line(self, enabled: bool) -> Self
Toggle full-row Vim current-line highlighting.
Sourcepub fn on_vim_mode_change(self, cb: Callback<TextAreaVimMode>) -> Self
pub fn on_vim_mode_change(self, cb: Callback<TextAreaVimMode>) -> Self
Observe internal Vim mode changes for status bars or mode-aware styling.
Sourcepub fn on_image_paste(self, cb: Callback<ImageContent>) -> Self
pub fn on_image_paste(self, cb: Callback<ImageContent>) -> Self
Set callback invoked when an image is pasted via Ctrl+Shift+I.
Sourcepub fn images(self, images: Vec<ImageContent>) -> Self
pub fn images(self, images: Vec<ImageContent>) -> Self
Set the ordered list of images associated with this text area.
Sourcepub fn on_images_change(self, cb: Callback<Vec<ImageContent>>) -> Self
pub fn on_images_change(self, cb: Callback<Vec<ImageContent>>) -> Self
Set callback invoked when the images list changes (e.g. image pasted, sentinel deleted).
Sourcepub fn image_mode(self, mode: TextAreaImageMode) -> Self
pub fn image_mode(self, mode: TextAreaImageMode) -> Self
Set the image display mode (Inline or Attachment).
Sourcepub fn image_placeholder(self, label: impl Into<Arc<str>>) -> Self
pub fn image_placeholder(self, label: impl Into<Arc<str>>) -> Self
Set the placeholder label rendered for each inline image sentinel (default: "[Image]").
Sourcepub fn image_placeholder_style(self, style: Style) -> Self
pub fn image_placeholder_style(self, style: Style) -> Self
Set the style for inline image placeholder labels.
Sourcepub fn image_placeholder_focus_style(self, style: Style) -> Self
pub fn image_placeholder_focus_style(self, style: Style) -> Self
Set the style for inline image placeholder labels when the widget is focused.
Sourcepub fn image_placeholder_hover_style(self, style: Style) -> Self
pub fn image_placeholder_hover_style(self, style: Style) -> Self
Set the hover style patched over inline image placeholder labels.
Sourcepub fn disabled_style(self, style: Style) -> Self
pub fn disabled_style(self, style: Style) -> Self
Set disabled style.
Sourcepub fn read_only(self, read_only: bool) -> Self
pub fn read_only(self, read_only: bool) -> Self
Set read-only mode. Allows mouse selection but blocks keyboard input.
Sourcepub fn multi_click_select(self, enabled: bool) -> Self
pub fn multi_click_select(self, enabled: bool) -> Self
Enable or disable word/line selection on double/triple click.
When false, double and triple clicks behave as single clicks
(no word or line selection). Drag-to-select remains unaffected.
Sourcepub fn triple_click_mode(self, mode: TripleClickSelectionMode) -> Self
pub fn triple_click_mode(self, mode: TripleClickSelectionMode) -> Self
Set how triple-click expands selection.
Sourcepub fn newline_binding(self, binding: TextAreaNewlineBinding) -> Self
pub fn newline_binding(self, binding: TextAreaNewlineBinding) -> Self
Override app-level newline key policy for this TextArea only.
Sourcepub fn tab_width(self, width: u8) -> Self
pub fn tab_width(self, width: u8) -> Self
When set to a non-zero value, pressing Tab inserts spaces up to the next tab stop
(aligning to a multiple of width columns) instead of moving focus.
Sourcepub fn insert_tab(self, insert_tab: bool) -> Self
pub fn insert_tab(self, insert_tab: bool) -> Self
When true, Tab inserts a tab character instead of moving focus.
Sourcepub fn tab_stop(self, tab_stop: u8) -> Self
pub fn tab_stop(self, tab_stop: u8) -> Self
Display width of a literal \t character. \t advances to the next
multiple of this value, measured from the logical line start.
Defaults to 8 (terminal convention). Set to 0 to render \t as
zero columns (rarely useful — mostly for parity with unicode-width).
Sourcepub fn scroll_offset(self, offset: usize) -> Self
pub fn scroll_offset(self, offset: usize) -> Self
Set scroll offset (line index).
Sourcepub fn scroll_to_line(self, line: usize) -> Self
pub fn scroll_to_line(self, line: usize) -> Self
Scroll to a zero-based logical/source line.
When wrapping is enabled, this resolves to the first visual row for the requested logical line. If the logical line is beyond the available text, reconciliation clamps to the last available visual row / maximum offset.
Sourcepub fn scroll_behavior(self, behavior: ScrollBehavior) -> Self
pub fn scroll_behavior(self, behavior: ScrollBehavior) -> Self
Set how explicit line scroll targets are applied.
This affects Self::scroll_to_line only; controlled offsets and
cursor auto-scroll remain immediate.
Sourcepub fn scroll_transition(self, transition: TransitionConfig) -> Self
pub fn scroll_transition(self, transition: TransitionConfig) -> Self
Animate explicit line scroll targets with transition.
Sourcepub fn scroll_wheel(self, enabled: bool) -> Self
pub fn scroll_wheel(self, enabled: bool) -> Self
Enable mouse wheel scrolling.
Sourcepub fn scroll_wheel_multiplier(self, multiplier: u16) -> Self
pub fn scroll_wheel_multiplier(self, multiplier: u16) -> Self
Override the app-wide mouse wheel step multiplier for this text area.
Sourcepub fn on_scroll(self, cb: Callback<ScrollEvent>) -> Self
pub fn on_scroll(self, cb: Callback<ScrollEvent>) -> Self
Set on-scroll callback.
Sourcepub fn on_scroll_to(self, cb: Callback<usize>) -> Self
pub fn on_scroll_to(self, cb: Callback<usize>) -> Self
Set on-scroll-to callback (for scrollbar dragging).
Sourcepub fn scrollbar_config(self, config: ScrollbarConfig) -> Self
pub fn scrollbar_config(self, config: ScrollbarConfig) -> Self
Set scrollbar configuration.
Sourcepub fn gutter_lines(self, lines: Arc<Vec<Vec<Span>>>, col_width: u16) -> Self
pub fn gutter_lines(self, lines: Arc<Vec<Vec<Span>>>, col_width: u16) -> Self
Set a custom gutter column.
lines is indexed by logical line (0-based). Continuation visual lines
(word-wrap overflow) show an empty gutter. col_width is the fixed
column width reserved for the gutter; when > 0 it overrides the
line_numbers gutter width everywhere.
Sourcepub fn gutter(self, gutter: TextAreaGutter) -> Self
pub fn gutter(self, gutter: TextAreaGutter) -> Self
Set a composable gutter. Compatibility fields are lowered for the current renderer.
Sourcepub fn gutter_inset(self, inset: u16) -> Self
pub fn gutter_inset(self, inset: u16) -> Self
Reserve empty cells before the gutter / line numbers.
Sourcepub fn copy_excluded_bytes(self, ranges: Arc<Vec<(usize, usize)>>) -> Self
pub fn copy_excluded_bytes(self, ranges: Arc<Vec<(usize, usize)>>) -> Self
Set byte ranges in value to exclude from clipboard copy.
Sourcepub fn clipboard_transform(
self,
transform: Arc<dyn for<'a> Fn(TextAreaClipboardTransformEvent<'a>) -> String>,
) -> Self
pub fn clipboard_transform( self, transform: Arc<dyn for<'a> Fn(TextAreaClipboardTransformEvent<'a>) -> String>, ) -> Self
Set an opt-in transform for selected text immediately before clipboard copy/cut.
By default, TextArea copies the rendered selection unchanged.
Sourcepub fn selection_excluded_lines(self, lines: Arc<Vec<usize>>) -> Self
pub fn selection_excluded_lines(self, lines: Arc<Vec<usize>>) -> Self
Set 0-based logical line indices whose selection newline highlight is suppressed.
Sourcepub fn h_scrollbar(self, h_scrollbar: bool) -> Self
pub fn h_scrollbar(self, h_scrollbar: bool) -> Self
Enable horizontal scrollbar (only effective when wrap is disabled).
Sourcepub fn h_scrollbar_variant(self, style: ScrollbarVariant) -> Self
pub fn h_scrollbar_variant(self, style: ScrollbarVariant) -> Self
Set horizontal scrollbar rendering style (integrated into border vs standalone row).
Sourcepub fn h_scrollbar_thumb(self, ch: char) -> Self
pub fn h_scrollbar_thumb(self, ch: char) -> Self
Set custom horizontal scrollbar thumb character (default: ‘█’).
Sourcepub fn sentinels(self, sentinels: Vec<TextAreaSentinel>) -> Self
pub fn sentinels(self, sentinels: Vec<TextAreaSentinel>) -> Self
Set the ordered list of custom inline sentinels.
Sourcepub fn on_sentinels_change(self, cb: Callback<Vec<TextAreaSentinel>>) -> Self
pub fn on_sentinels_change(self, cb: Callback<Vec<TextAreaSentinel>>) -> Self
Set callback invoked when the sentinels list changes (a sentinel was deleted).
Sourcepub fn on_sentinel_event(self, cb: Callback<Vec<SentinelEvent>>) -> Self
pub fn on_sentinel_event(self, cb: Callback<Vec<SentinelEvent>>) -> Self
Callback for sentinel lifecycle (e.g. user-deleted token with stable id).
Sourcepub fn on_sentinel_click(self, cb: Callback<TextAreaSentinelClickEvent>) -> Self
pub fn on_sentinel_click(self, cb: Callback<TextAreaSentinelClickEvent>) -> Self
Callback invoked when an inline image or custom sentinel placeholder is clicked.
Sourcepub fn decoration(self, decoration: TextAreaDecoration) -> Self
pub fn decoration(self, decoration: TextAreaDecoration) -> Self
Add a byte-range decoration.
Sourcepub fn decorations(
self,
decorations: impl IntoIterator<Item = TextAreaDecoration>,
) -> Self
pub fn decorations( self, decorations: impl IntoIterator<Item = TextAreaDecoration>, ) -> Self
Add byte-range decorations.
Sourcepub fn virtual_text(self, virtual_text: TextAreaVirtualText) -> Self
pub fn virtual_text(self, virtual_text: TextAreaVirtualText) -> Self
Add non-editable virtual text rendered inline or at end-of-line.
Sourcepub fn virtual_texts(
self,
virtual_texts: impl IntoIterator<Item = TextAreaVirtualText>,
) -> Self
pub fn virtual_texts( self, virtual_texts: impl IntoIterator<Item = TextAreaVirtualText>, ) -> Self
Add non-editable virtual text entries.
Sourcepub fn on_text_paste(self, cb: Callback<TextAreaPasteEvent>) -> Self
pub fn on_text_paste(self, cb: Callback<TextAreaPasteEvent>) -> Self
Handle pasted text before the default insertion path.
When set, the callback receives the pasted text plus the current cursor/selection and the text area does not insert the text itself.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TextArea
impl !Send for TextArea
impl !Sync for TextArea
impl !UnwindSafe for TextArea
impl Freeze for TextArea
impl Unpin for TextArea
impl UnsafeUnpin for TextArea
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.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,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.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> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> IntoElement for T
impl<T> IntoElement for T
Source§fn key(self, key: impl Into<Key>) -> Element
fn key(self, key: impl Into<Key>) -> Element
Source§fn component_state_key(self, key: impl Into<Key>) -> Element
fn component_state_key(self, key: impl Into<Key>) -> Element
Element::component_state_key.Source§fn min_width(self, w: Length) -> Element
fn min_width(self, w: Length) -> Element
LayoutConstraints::min_w for semantics.Source§fn min_height(self, h: Length) -> Element
fn min_height(self, h: Length) -> Element
LayoutConstraints::min_h for semantics.Source§fn max_width(self, w: Length) -> Element
fn max_width(self, w: Length) -> Element
LayoutConstraints::max_w for semantics.Source§fn max_height(self, h: Length) -> Element
fn max_height(self, h: Length) -> Element
LayoutConstraints::max_h for semantics.Source§fn reflows(self, reflows: bool) -> Element
fn reflows(self, reflows: bool) -> Element
Source§fn shrink_priority(self, priority: ShrinkPriority) -> Element
fn shrink_priority(self, priority: ShrinkPriority) -> Element
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more