Skip to main content

Tab

Struct Tab 

Source
pub struct Tab { /* private fields */ }
Expand description

A single tab within a TabBar.

Renders per TabBarStyle (default TabBarStyle::Underline); pass the same style used on the parent TabBar via Tab::style so both agree.

Implementations§

Source§

impl Tab

Source

pub fn new(id: impl Into<ElementId>) -> Self

Source

pub fn style(self, style: TabBarStyle) -> Self

Sets the visual style. Should match the parent TabBar’s style.

Source

pub fn start_slot<E: IntoElement>(self, element: impl Into<Option<E>>) -> Self

Source

pub fn end_slot<E: IntoElement>(self, element: impl Into<Option<E>>) -> Self

Source

pub fn content_height(cx: &App) -> Pixels

Source

pub fn container_height(cx: &App) -> Pixels

Trait Implementations§

Source§

impl Component for Tab

Source§

fn scope() -> ComponentScope

Returns the scope of the component. Read more
Source§

fn description() -> Option<&'static str>

An optional description of the component. Read more
Source§

fn preview(_window: &mut Window, _cx: &mut App) -> Option<AnyElement>

The component’s preview. Read more
Source§

fn id() -> ComponentId

The component’s unique identifier. Read more
Source§

fn status() -> ComponentStatus

The ready status of this component. Read more
Source§

fn name() -> &'static str

The name of the component. Read more
Source§

fn sort_name() -> &'static str

Returns a name that the component should be sorted by. Read more
Source§

impl InteractiveElement for Tab

Source§

fn interactivity(&mut self) -> &mut Interactivity

Retrieve the interactivity state associated with this element
Source§

fn group(self, group: impl Into<SharedString>) -> Self

Assign this element to a group of elements that can be styled together
Source§

fn id(self, id: impl Into<ElementId>) -> Stateful<Self>

Assign this element an ID, so that it can be used with interactivity
Source§

fn track_focus(self, focus_handle: &FocusHandle) -> Self

Track the focus state of the given focus handle on this element. If the focus handle is focused by the application, this element will apply its focused styles.
Source§

fn tab_stop(self, tab_stop: bool) -> Self

Set whether this element is a tab stop. Read more
Source§

fn tab_index(self, index: isize) -> Self

Set index of the tab stop order, and set this node as a tab stop. This will default the element to being a tab stop. See Self::tab_stop for more information. This should only be used in conjunction with tab_group in order to not interfere with the tab index of other elements.
Source§

fn tab_group(self) -> Self

Designate this div as a “tab group”. Tab groups have their own location in the tab-index order, but for children of the tab group, the tab index is reset to 0. This can be useful for swapping the order of tab stops within the group, without having to renumber all the tab stops in the whole application.
Source§

fn key_context<C, E>(self, key_context: C) -> Self
where C: TryInto<KeyContext, Error = E>, E: Display,

Set the keymap context for this element. This will be used to determine which action to dispatch from the keymap.
Source§

fn hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self

Apply the given style to this element when the mouse hovers over it
Source§

fn group_hover( self, group_name: impl Into<SharedString>, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self

Apply the given style to this element when the mouse hovers over a group member
Source§

fn on_mouse_down( self, button: MouseButton, listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse down event for the given mouse button. The fluent API equivalent to Interactivity::on_mouse_down. Read more
Source§

fn debug_selector(self, _: impl FnOnce() -> String) -> Self

Set a key that can be used to look up this element’s bounds in the [crate::VisualTestContext::debug_bounds] map This is a noop in release builds
Source§

fn capture_any_mouse_down( self, listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse down event for any button, during the capture phase. The fluent API equivalent to Interactivity::capture_any_mouse_down. Read more
Source§

fn on_any_mouse_down( self, listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse down event for any button, during the capture phase. The fluent API equivalent to Interactivity::on_any_mouse_down. Read more
Source§

fn on_mouse_up( self, button: MouseButton, listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse up event for the given button, during the bubble phase. The fluent API equivalent to Interactivity::on_mouse_up. Read more
Source§

fn capture_any_mouse_up( self, listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse up event for any button, during the capture phase. The fluent API equivalent to Interactivity::capture_any_mouse_up. Read more
Source§

fn on_mouse_pressure( self, listener: impl Fn(&MousePressureEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse pressure event, during the bubble phase the fluent API equivalent to Interactivity::on_mouse_pressure Read more
Source§

fn capture_mouse_pressure( self, listener: impl Fn(&MousePressureEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse pressure event, during the capture phase the fluent API equivalent to Interactivity::on_mouse_pressure Read more
Source§

fn on_mouse_down_out( self, listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse down event, on any button, during the capture phase, when the mouse is outside of the bounds of this element. The fluent API equivalent to Interactivity::on_mouse_down_out. Read more
Source§

fn on_mouse_up_out( self, button: MouseButton, listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse up event, for the given button, during the capture phase, when the mouse is outside of the bounds of this element. The fluent API equivalent to Interactivity::on_mouse_up_out. Read more
Source§

fn on_mouse_move( self, listener: impl Fn(&MouseMoveEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to the mouse move event, during the bubble phase. The fluent API equivalent to Interactivity::on_mouse_move. Read more
Source§

fn on_drag_move<T>( self, listener: impl Fn(&DragMoveEvent<T>, &mut Window, &mut App) + 'static, ) -> Self
where T: 'static,

Bind the given callback to the mouse drag event of the given type. Note that this will be called for all move events, inside or outside of this element, as long as the drag was started with this element under the mouse. Useful for implementing draggable UIs that don’t conform to a drag and drop style interaction, like resizing. The fluent API equivalent to Interactivity::on_drag_move. Read more
Source§

fn on_scroll_wheel( self, listener: impl Fn(&ScrollWheelEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to scroll wheel events during the bubble phase. The fluent API equivalent to Interactivity::on_scroll_wheel. Read more
Source§

fn on_pinch( self, listener: impl Fn(&PinchEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to pinch gesture events during the bubble phase. The fluent API equivalent to Interactivity::on_pinch. Read more
Source§

fn capture_pinch( self, listener: impl Fn(&PinchEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to pinch gesture events during the capture phase. The fluent API equivalent to Interactivity::capture_pinch. Read more
Source§

fn capture_action<A>( self, listener: impl Fn(&A, &mut Window, &mut App) + 'static, ) -> Self
where A: Action,

Capture the given action, before normal action dispatch can fire. The fluent API equivalent to Interactivity::capture_action. Read more
Source§

fn on_action<A>( self, listener: impl Fn(&A, &mut Window, &mut App) + 'static, ) -> Self
where A: Action,

Bind the given callback to an action dispatch during the bubble phase. The fluent API equivalent to Interactivity::on_action. Read more
Source§

fn on_boxed_action( self, action: &(dyn Action + 'static), listener: impl Fn(&(dyn Action + 'static), &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to an action dispatch, based on a dynamic action parameter instead of a type parameter. Useful for component libraries that want to expose action bindings to their users. The fluent API equivalent to Interactivity::on_boxed_action. Read more
Source§

fn on_key_down( self, listener: impl Fn(&KeyDownEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to key down events during the bubble phase. The fluent API equivalent to Interactivity::on_key_down. Read more
Source§

fn capture_key_down( self, listener: impl Fn(&KeyDownEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to key down events during the capture phase. The fluent API equivalent to Interactivity::capture_key_down. Read more
Source§

fn on_key_up( self, listener: impl Fn(&KeyUpEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to key up events during the bubble phase. The fluent API equivalent to Interactivity::on_key_up. Read more
Source§

fn capture_key_up( self, listener: impl Fn(&KeyUpEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to key up events during the capture phase. The fluent API equivalent to Interactivity::capture_key_up. Read more
Source§

fn on_modifiers_changed( self, listener: impl Fn(&ModifiersChangedEvent, &mut Window, &mut App) + 'static, ) -> Self

Bind the given callback to modifiers changing events. The fluent API equivalent to Interactivity::on_modifiers_changed. Read more
Source§

fn drag_over<S>( self, f: impl Fn(StyleRefinement, &S, &mut Window, &mut App) -> StyleRefinement + 'static, ) -> Self
where S: 'static,

Apply the given style when the given data type is dragged over this element
Source§

fn group_drag_over<S>( self, group_name: impl Into<SharedString>, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
where S: 'static,

Apply the given style when the given data type is dragged over this element’s group
Source§

fn on_drop<T>( self, listener: impl Fn(&T, &mut Window, &mut App) + 'static, ) -> Self
where T: 'static,

Bind the given callback to drop events of the given type, whether or not the drag started on this element. The fluent API equivalent to Interactivity::on_drop. Read more
Source§

fn can_drop( self, predicate: impl Fn(&(dyn Any + 'static), &mut Window, &mut App) -> bool + 'static, ) -> Self

Use the given predicate to determine whether or not a drop event should be dispatched to this element. The fluent API equivalent to Interactivity::can_drop.
Source§

fn occlude(self) -> Self

Block the mouse from all interactions with elements behind this element’s hitbox. Typically block_mouse_except_scroll should be preferred. The fluent API equivalent to Interactivity::occlude_mouse.
Source§

fn window_control_area(self, area: WindowControlArea) -> Self

Set the bounds of this element as a window control area for the platform window. The fluent API equivalent to Interactivity::window_control_area.
Source§

fn block_mouse_except_scroll(self) -> Self

Block non-scroll mouse interactions with elements behind this element’s hitbox. The fluent API equivalent to Interactivity::block_mouse_except_scroll. Read more
Source§

fn focus(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
where Self: Sized,

Set the given styles to be applied when this element, specifically, is focused. Requires that the element is focusable. Elements can be made focusable using InteractiveElement::track_focus.
Source§

fn in_focus(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
where Self: Sized,

Set the given styles to be applied when this element is inside another element that is focused. Requires that the element is focusable. Elements can be made focusable using InteractiveElement::track_focus.
Source§

fn focus_visible( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
where Self: Sized,

Set the given styles to be applied when this element is focused via keyboard navigation. This is similar to CSS’s :focus-visible pseudo-class - it only applies when the element is focused AND the user is navigating via keyboard (not mouse clicks). Requires that the element is focusable. Elements can be made focusable using InteractiveElement::track_focus.
Source§

impl IntoElement for Tab

Source§

type Element = Component<Tab>

The specific type of element into which the implementing type is converted. Useful for converting other types into elements automatically, like Strings
Source§

fn into_element(self) -> Self::Element

Convert self into a type that implements Element.
Source§

fn into_any_element(self) -> AnyElement

Convert self into a dynamically-typed AnyElement.
Source§

impl ParentElement for Tab

Source§

fn extend(&mut self, elements: impl IntoIterator<Item = AnyElement>)

Extend this element’s children with the given child elements.
Source§

fn child(self, child: impl IntoElement) -> Self
where Self: Sized,

Add a single child element to this element.
Source§

fn children(self, children: impl IntoIterator<Item = impl IntoElement>) -> Self
where Self: Sized,

Add multiple child elements to this element.
Source§

impl RenderOnce for Tab

Source§

fn render(self, _: &mut Window, cx: &mut App) -> Stateful<Div>

Render this component into an element tree. Note that this method takes ownership of self, as compared to Render::render() method which takes a mutable reference.
Source§

impl StatefulInteractiveElement for Tab

Source§

fn focusable(self) -> Self

Set this element to focusable.
Source§

fn overflow_scroll(self) -> Self

Set the overflow x and y to scroll.
Source§

fn overflow_x_scroll(self) -> Self

Set the overflow x to scroll.
Source§

fn overflow_y_scroll(self) -> Self

Set the overflow y to scroll.
Source§

fn track_scroll(self, scroll_handle: &ScrollHandle) -> Self

Track the scroll state of this element with the given handle.
Source§

fn anchor_scroll(self, scroll_anchor: Option<ScrollAnchor>) -> Self

Track the scroll state of this element with the given handle.
Source§

fn active(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
where Self: Sized,

Set the given styles to be applied when this element is active.
Source§

fn group_active( self, group_name: impl Into<SharedString>, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
where Self: Sized,

Set the given styles to be applied when this element’s group is active.
Source§

fn on_click( self, listener: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static, ) -> Self
where Self: Sized,

Bind the given callback to click events of this element. The fluent API equivalent to Interactivity::on_click. Read more
Source§

fn on_aux_click( self, listener: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static, ) -> Self
where Self: Sized,

Bind the given callback to non-primary click events of this element. The fluent API equivalent to Interactivity::on_aux_click. Read more
Source§

fn on_drag<T, W>( self, value: T, constructor: impl Fn(&T, Point<Pixels>, &mut Window, &mut App) -> Entity<W> + 'static, ) -> Self
where Self: Sized, T: 'static, W: 'static + Render,

On drag initiation, this callback will be used to create a new view to render the dragged value for a drag and drop operation. This API should also be used as the equivalent of ‘on drag start’ with the InteractiveElement::on_drag_move API. The callback also has access to the offset of triggering click from the origin of parent element. The fluent API equivalent to Interactivity::on_drag. Read more
Source§

fn on_hover( self, listener: impl Fn(&bool, &mut Window, &mut App) + 'static, ) -> Self
where Self: Sized,

Bind the given callback on the hover start and end events of this element. Note that the boolean passed to the callback is true when the hover starts and false when it ends. The fluent API equivalent to Interactivity::on_hover. Read more
Source§

fn tooltip( self, build_tooltip: impl Fn(&mut Window, &mut App) -> AnyView + 'static, ) -> Self
where Self: Sized,

Use the given callback to construct a new tooltip view when the mouse hovers over this element. The fluent API equivalent to Interactivity::tooltip.
Source§

fn hoverable_tooltip( self, build_tooltip: impl Fn(&mut Window, &mut App) -> AnyView + 'static, ) -> Self
where Self: Sized,

Use the given callback to construct a new tooltip view when the mouse hovers over this element. The tooltip itself is also hoverable and won’t disappear when the user moves the mouse into the tooltip. The fluent API equivalent to Interactivity::hoverable_tooltip.
Source§

impl Toggleable for Tab

Source§

fn toggle_state(self, selected: bool) -> Self

Sets whether the element is selected.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Tab

§

impl !Send for Tab

§

impl !Sync for Tab

§

impl !UnwindSafe for Tab

§

impl Freeze for Tab

§

impl Unpin for Tab

§

impl UnsafeUnpin for Tab

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where 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) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
Source§

impl<E> AnimationExt for E
where E: IntoElement + 'static,

Source§

fn with_animation( self, id: impl Into<ElementId>, animation: Animation, animator: impl Fn(Self, f32) -> Self + 'static, ) -> AnimationElement<Self>
where Self: Sized,

Render this component or element with an animation
Source§

fn with_animations( self, id: impl Into<ElementId>, animations: Vec<Animation>, animator: impl Fn(Self, usize, f32) -> Self + 'static, ) -> AnimationElement<Self>
where Self: Sized,

Render this component or element with a chain of animations
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, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CommonAnimationExt for T
where T: AnimationExt,

Source§

fn with_rotate_animation(self, duration: u64) -> AnimationElement<Self>
where Self: Transformable + Sized,

Render this component as rotating over the given duration. Read more
Source§

fn with_keyed_rotate_animation( self, id: impl Into<ElementId>, duration: u64, ) -> AnimationElement<Self>
where Self: Transformable + Sized,

Render this component as rotating with the given element ID over the given duration.
Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

impl<T> FluentBuilder for T
where T: IntoElement,

Source§

fn map<U>(self, f: impl FnOnce(Self) -> U) -> U
where Self: Sized,

Imperatively modify self with the given closure.
Source§

fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
where Self: Sized,

Conditionally modify self with the given closure.
Source§

fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
where Self: Sized,

Conditionally modify self with the given closure.
Source§

fn when_some<T>( self, option: Option<T>, then: impl FnOnce(Self, T) -> Self, ) -> Self
where Self: Sized,

Conditionally unwrap and modify self with the given closure, if the given option is Some.
Source§

fn when_none<T>( self, option: &Option<T>, then: impl FnOnce(Self) -> Self, ) -> Self
where Self: Sized,

Conditionally unwrap and modify self with the given closure, if the given option is None.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> Instrument for T

Source§

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

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

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, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
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
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. 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.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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