pub struct DiffView { /* private fields */ }Expand description
A diff view widget with selectable rendering backends.
Implementations§
Source§impl DiffView
impl DiffView
Sourcepub fn patch(self, patch: impl Into<Arc<str>>) -> Self
pub fn patch(self, patch: impl Into<Arc<str>>) -> Self
Set the diff content from a raw unified diff (patch) string.
Sourcepub fn with_content(
before: impl Into<Arc<str>>,
after: impl Into<Arc<str>>,
) -> Self
pub fn with_content( before: impl Into<Arc<str>>, after: impl Into<Arc<str>>, ) -> Self
Create a diff view for the given before/after text.
Sourcepub fn from_patch(patch: impl Into<Arc<str>>) -> Self
pub fn from_patch(patch: impl Into<Arc<str>>) -> Self
Create a diff view from a raw unified diff (patch) string.
This constructor is useful when you have a pre-computed patch (e.g. from
git or an API) and want to display it with DiffView colors and
formatting.
Sourcepub fn backend(self, backend: DiffViewBackend) -> Self
pub fn backend(self, backend: DiffViewBackend) -> Self
Set rendering backend explicitly.
Not required in most cases: calling Self::text_area or
Self::document_view also infers backend when this isn’t set.
Sourcepub fn editable(self, editable: bool) -> Self
pub fn editable(self, editable: bool) -> Self
Enable/disable editing when using the TextArea backend.
This flag is ignored by the DocumentView backend.
Sourcepub fn scroll_offset(self, offset: usize) -> Self
pub fn scroll_offset(self, offset: usize) -> Self
Set controlled vertical scroll offset for rendered pane(s).
Sourcepub fn scroll_to_hunk(self, index: usize) -> Self
pub fn scroll_to_hunk(self, index: usize) -> Self
Scroll rendered pane(s) to the first visible row for a parsed patch hunk.
index is zero-based patch order. The target is resolved after
indentation trimming and context collapse, then delegated to the active
backend so soft wrapping maps to the final visual row during layout.
A controlled Self::scroll_offset takes precedence if both are set.
Sourcepub fn on_scroll(self, cb: Callback<DiffScrollEvent>) -> Self
pub fn on_scroll(self, cb: Callback<DiffScrollEvent>) -> Self
Receive pane-aware scroll events from rendered pane(s).
Sourcepub fn on_context_separator_click(
self,
cb: Callback<DiffContextSeparatorEvent>,
) -> Self
pub fn on_context_separator_click( self, cb: Callback<DiffContextSeparatorEvent>, ) -> Self
Set the callback fired when a visible context separator is clicked.
Use Self::expanded_contexts with the clicked event’s range on the
next render to expand the hidden lines represented by that separator.
Sourcepub fn context_separator_hover_style(self, style: Style) -> Self
pub fn context_separator_hover_style(self, style: Style) -> Self
Set the style patched over a context separator while the pointer hovers it.
Sourcepub fn mode(self, mode: DiffViewMode) -> Self
pub fn mode(self, mode: DiffViewMode) -> Self
Set the diff presentation mode.
Sourcepub fn text_area(self, text_area: TextArea) -> Self
pub fn text_area(self, text_area: TextArea) -> Self
Provide a base TextArea configuration.
When backend is not explicitly set, this also selects the TextArea
backend.
Sourcepub fn document_view(self, document_view: DocumentView) -> Self
pub fn document_view(self, document_view: DocumentView) -> Self
Provide a base DocumentView configuration.
When backend is not explicitly set, this also selects the
DocumentView backend.
Sourcepub fn line_numbers(self, show: bool) -> Self
pub fn line_numbers(self, show: bool) -> Self
Enable/disable line numbers in both backends.
Sourcepub fn min_line_number_width(self, width: u8) -> Self
pub fn min_line_number_width(self, width: u8) -> Self
Set minimum line-number digit width in both backends.
Sourcepub fn border(self, border: bool) -> Self
pub fn border(self, border: bool) -> Self
Show or hide an outer border around the whole DiffView.
Sourcepub fn panels_border(self, border: bool) -> Self
pub fn panels_border(self, border: bool) -> Self
Show or hide per-pane borders in split/unified pane wrappers.
Sourcepub fn highlight_full_width(self, enabled: bool) -> Self
pub fn highlight_full_width(self, enabled: bool) -> Self
Highlight changed-line backgrounds to full row width.
Sourcepub fn gutter_inset(self, inset: u16) -> Self
pub fn gutter_inset(self, inset: u16) -> Self
Reserve empty cells before the gutter / line numbers in both backends.
Sourcepub fn h_scrollbar(self, show: bool) -> Self
pub fn h_scrollbar(self, show: bool) -> Self
Show or hide horizontal scrollbars in both backends.
Sourcepub fn single_scrollbar(self, enabled: bool) -> Self
pub fn single_scrollbar(self, enabled: bool) -> Self
In split mode, render a single vertical scrollbar on the right pane only.
Sourcepub fn join_frame(self, join: bool) -> Self
pub fn join_frame(self, join: bool) -> Self
Join pane frames when adjacent (uses Frame::join_frame).
Sourcepub fn vertical_separator(self, enabled: bool) -> Self
pub fn vertical_separator(self, enabled: bool) -> Self
Show a vertical separator between split panes.
Sourcepub fn vertical_separator_char(self, ch: char) -> Self
pub fn vertical_separator_char(self, ch: char) -> Self
Set the split-pane vertical separator character.
Sourcepub fn vertical_separator_style(self, style: Style) -> Self
pub fn vertical_separator_style(self, style: Style) -> Self
Set style for the split-pane vertical separator.
Sourcepub fn diff_style(self, style: DiffPalette) -> Self
pub fn diff_style(self, style: DiffPalette) -> Self
Configure diff line and word styles.
Sourcepub fn neutral_bg(self, color: Color) -> Self
pub fn neutral_bg(self, color: Color) -> Self
Set background color for unchanged/context lines.
Note: split filler lines (DiffLineKind::Empty) are not affected.
Enable cross-widget drag selection for this diff view’s internal panels.
In unified mode the id is used as-is on the single panel.
In split mode the id is suffixed with :left and :right so that
only same-side panels share selection across multiple DiffViews.
Multiple DiffViews (and plain DocumentViews) under the same
ScrollView that share the same id participate in unified drag
selection and copy.
Sourcepub fn prefixes(self, prefixes: DiffPrefixes) -> Self
pub fn prefixes(self, prefixes: DiffPrefixes) -> Self
Configure diff prefixes.
Sourcepub fn show_prefixes(self, show: bool) -> Self
pub fn show_prefixes(self, show: bool) -> Self
Toggle prefix rendering.
Sourcepub fn trim_common_indent(self, enabled: bool) -> Self
pub fn trim_common_indent(self, enabled: bool) -> Self
Trim shared leading indentation from diff line content.
When enabled (the default), DiffView computes the smallest common
leading indent across visible non-empty diff lines and removes that many
leading spaces/tabs from line content before rendering. In split mode,
both panes share the same trim amount so rows stay aligned.
Sourcepub fn context_lines(self, n: usize) -> Self
pub fn context_lines(self, n: usize) -> Self
Set the number of unchanged context lines to keep around each change.
When set, unchanged regions farther than n lines from any change are
collapsed into a single separator line. The default (None) shows
all lines.
DiffView::with_content(before, after).context_lines(4)Sourcepub fn show_context_separator(self, show: bool) -> Self
pub fn show_context_separator(self, show: bool) -> Self
Show or hide the placeholder separator line when collapsing context.
When true (the default) a context separator line is rendered in place
of each collapsed region. When false the hidden lines are simply
omitted without any visual placeholder. Only meaningful when
Self::context_lines is set.
Sourcepub fn context_separator_text(self, text: impl Into<Arc<str>>) -> Self
pub fn context_separator_text(self, text: impl Into<Arc<str>>) -> Self
Set the template text used for context separators.
Supported placeholders:
{count}: number of hidden lines{line_word}:lineorlines{direction}:above,below, orbetween{arrow}:↑,↓, or↑↓
Sourcepub fn context_separator_min_lines(self, min_lines: usize) -> Self
pub fn context_separator_min_lines(self, min_lines: usize) -> Self
Minimum number of hidden lines required before a context separator is shown.
Shorter collapsed runs render as normal context lines instead of a
separator placeholder (default: 2).
Sourcepub fn context_expand_lines(self, lines: usize) -> Self
pub fn context_expand_lines(self, lines: usize) -> Self
Default number of hidden lines revealed per context-separator click.
This value is included in DiffContextSeparatorEvent and used by
DiffContextSeparatorEvent::next_expansion (default: 20).
Sourcepub fn expanded_contexts(
self,
ranges: impl IntoIterator<Item = DiffContextRange>,
) -> Self
pub fn expanded_contexts( self, ranges: impl IntoIterator<Item = DiffContextRange>, ) -> Self
Set collapsed context ranges that should render fully expanded.
Pass ranges received from DiffContextSeparatorEvent::range to turn
individual separators back into their hidden lines. This is controlled
by the app so expansion state survives normal component rerenders.
Sourcepub fn expanded_context_expansions(
self,
expansions: impl IntoIterator<Item = DiffContextExpansion>,
) -> Self
pub fn expanded_context_expansions( self, expansions: impl IntoIterator<Item = DiffContextExpansion>, ) -> Self
Set controlled partial or full context expansions.
Sourcepub fn expanded_context(self, range: DiffContextRange) -> Self
pub fn expanded_context(self, range: DiffContextRange) -> Self
Expand one collapsed context range fully.
Sourcepub fn expanded_context_lines(
self,
range: DiffContextRange,
lines_revealed: usize,
) -> Self
pub fn expanded_context_lines( self, range: DiffContextRange, lines_revealed: usize, ) -> Self
Expand one collapsed context range by a specific number of lines.
Sourcepub fn base_color_strategy(
self,
strategy: impl TextAreaColorStrategy + 'static,
) -> Self
pub fn base_color_strategy( self, strategy: impl TextAreaColorStrategy + 'static, ) -> Self
Provide a base color strategy (syntax highlighting).
Applied to both backends:
TextAreabackend viaTextArea::color_strategyDocumentViewbackend via the internal diff formatter
Sourcepub fn language(self, language: impl Into<Arc<str>>) -> Self
pub fn language(self, language: impl Into<Arc<str>>) -> Self
Set the language identifier for syntax 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 the theme identifier for syntax 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.
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 background colors.
Use shared precomputed diff data.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DiffView
impl !RefUnwindSafe for DiffView
impl !Send for DiffView
impl !Sync for DiffView
impl !UnwindSafe for DiffView
impl Unpin for DiffView
impl UnsafeUnpin for DiffView
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>,
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
Source§type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
Source§fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
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