Struct Dom
pub struct Dom;
Expand description
A Renderer
that uses web-sys
to manipulate DOM elements in the browser.
Implementationsยง
ยงimpl Dom
impl Dom
pub fn intern(text: &str) -> &str
pub fn create_element(tag: &str, namespace: Option<&str>) -> Element
pub fn create_text_node(text: &str) -> Text
pub fn create_placeholder() -> Comment
pub fn set_text(node: &Text, text: &str)
pub fn set_attribute(node: &Element, name: &str, value: &str)
pub fn remove_attribute(node: &Element, name: &str)
pub fn insert_node(parent: &Element, new_child: &Node, anchor: Option<&Node>)
pub fn try_insert_node( parent: &Element, new_child: &Node, anchor: Option<&Node>, ) -> bool
pub fn remove_node(parent: &Element, child: &Node) -> Option<Node>
pub fn remove(node: &Node)
pub fn get_parent(node: &Node) -> Option<Node>
pub fn first_child(node: &Node) -> Option<Node>
pub fn next_sibling(node: &Node) -> Option<Node>
pub fn log_node(node: &Node)
pub fn clear_children(parent: &Element)
pub fn mount_before<M>(new_child: &mut M, before: &Node)where
M: Mountable,
pub fn mount_before<M>(new_child: &mut M, before: &Node)where
M: Mountable,
Mounts the new child before the marker as its sibling.
ยงPanics
The default implementation panics if before
does not have a parent [crate::renderer::types::Element
].
pub fn try_mount_before<M>(new_child: &mut M, before: &Node) -> boolwhere
M: Mountable,
pub fn try_mount_before<M>(new_child: &mut M, before: &Node) -> boolwhere
M: Mountable,
Tries to mount the new child before the marker as its sibling.
Returns false
if the child did not have a valid parent.
pub fn set_property(el: &Element, key: &str, value: &JsValue)
pub fn add_event_listener( el: &Element, name: &str, cb: Box<dyn FnMut(JsValue)>, ) -> RemoveEventHandler<Element>
pub fn add_event_listener_use_capture( el: &Element, name: &str, cb: Box<dyn FnMut(JsValue)>, ) -> RemoveEventHandler<Element>
pub fn event_target<T>(ev: &JsValue) -> Twhere
T: CastFrom<Element>,
pub fn add_event_listener_delegated( el: &Element, name: Cow<'static, str>, delegation_key: Cow<'static, str>, cb: Box<dyn FnMut(JsValue)>, ) -> RemoveEventHandler<Element>
pub fn class_list(el: &Element) -> DomTokenList
pub fn add_class(list: &DomTokenList, name: &str)
pub fn remove_class(list: &DomTokenList, name: &str)
pub fn style(el: &Element) -> CssStyleDeclaration
pub fn set_css_property(style: &CssStyleDeclaration, name: &str, value: &str)
pub fn remove_css_property(style: &CssStyleDeclaration, name: &str)
pub fn set_inner_html(el: &Element, html: &str)
pub fn get_template<V>() -> HtmlTemplateElementwhere
V: ToTemplate + 'static,
pub fn clone_template(tpl: &HtmlTemplateElement) -> Element
pub fn create_element_from_html(html: Cow<'static, str>) -> Element
pub fn create_svg_element_from_html(html: Cow<'static, str>) -> Element
Trait Implementationsยง
ยงimpl<El, At, Ch, V> AriaAttributes<Dom, V> for HtmlElement<El, At, Ch>
impl<El, At, Ch, V> AriaAttributes<Dom, V> for HtmlElement<El, At, Ch>
ยงfn aria_activedescendant(
self,
value: V,
) -> Self::Output<Attr<AriaActivedescendant, V>>
fn aria_activedescendant( self, value: V, ) -> Self::Output<Attr<AriaActivedescendant, V>>
Identifies the currently active descendant of a composite widget.
ยงfn aria_atomic(self, value: V) -> Self::Output<Attr<AriaAtomic, V>>
fn aria_atomic(self, value: V) -> Self::Output<Attr<AriaAtomic, V>>
Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the
aria-relevant
attribute.ยงfn aria_autocomplete(self, value: V) -> Self::Output<Attr<AriaAutocomplete, V>>
fn aria_autocomplete(self, value: V) -> Self::Output<Attr<AriaAutocomplete, V>>
Indicates whether user input completion suggestions are provided.
ยงfn aria_busy(self, value: V) -> Self::Output<Attr<AriaBusy, V>>
fn aria_busy(self, value: V) -> Self::Output<Attr<AriaBusy, V>>
Indicates whether an element, and its subtree, are currently being updated.
ยงfn aria_checked(self, value: V) -> Self::Output<Attr<AriaChecked, V>>
fn aria_checked(self, value: V) -> Self::Output<Attr<AriaChecked, V>>
Indicates the current โcheckedโ state of checkboxes, radio buttons, and other widgets.
ยงfn aria_colcount(self, value: V) -> Self::Output<Attr<AriaColcount, V>>
fn aria_colcount(self, value: V) -> Self::Output<Attr<AriaColcount, V>>
Defines the number of columns in a table, grid, or treegrid.
ยงfn aria_colindex(self, value: V) -> Self::Output<Attr<AriaColindex, V>>
fn aria_colindex(self, value: V) -> Self::Output<Attr<AriaColindex, V>>
Defines an elementโs column index or position with respect to the total number of columns within a table, grid, or treegrid.
ยงfn aria_colspan(self, value: V) -> Self::Output<Attr<AriaColspan, V>>
fn aria_colspan(self, value: V) -> Self::Output<Attr<AriaColspan, V>>
Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
ยงfn aria_controls(self, value: V) -> Self::Output<Attr<AriaControls, V>>
fn aria_controls(self, value: V) -> Self::Output<Attr<AriaControls, V>>
Identifies the element (or elements) whose contents or presence are controlled by the current element.
ยงfn aria_current(self, value: V) -> Self::Output<Attr<AriaCurrent, V>>
fn aria_current(self, value: V) -> Self::Output<Attr<AriaCurrent, V>>
Indicates the element that represents the current item within a container or set of related elements.
ยงfn aria_describedby(self, value: V) -> Self::Output<Attr<AriaDescribedby, V>>
fn aria_describedby(self, value: V) -> Self::Output<Attr<AriaDescribedby, V>>
Identifies the element (or elements) that describes the object.
ยงfn aria_description(self, value: V) -> Self::Output<Attr<AriaDescription, V>>
fn aria_description(self, value: V) -> Self::Output<Attr<AriaDescription, V>>
Defines a string value that describes or annotates the current element.
ยงfn aria_details(self, value: V) -> Self::Output<Attr<AriaDetails, V>>
fn aria_details(self, value: V) -> Self::Output<Attr<AriaDetails, V>>
Identifies the element that provides additional information related to the object.
ยงfn aria_disabled(self, value: V) -> Self::Output<Attr<AriaDisabled, V>>
fn aria_disabled(self, value: V) -> Self::Output<Attr<AriaDisabled, V>>
Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
ยงfn aria_dropeffect(self, value: V) -> Self::Output<Attr<AriaDropeffect, V>>
fn aria_dropeffect(self, value: V) -> Self::Output<Attr<AriaDropeffect, V>>
Indicates what functions can be performed when a dragged object is released on the drop target.
ยงfn aria_errormessage(self, value: V) -> Self::Output<Attr<AriaErrormessage, V>>
fn aria_errormessage(self, value: V) -> Self::Output<Attr<AriaErrormessage, V>>
Defines the element that provides an error message related to the object.
ยงfn aria_expanded(self, value: V) -> Self::Output<Attr<AriaExpanded, V>>
fn aria_expanded(self, value: V) -> Self::Output<Attr<AriaExpanded, V>>
Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
ยงfn aria_flowto(self, value: V) -> Self::Output<Attr<AriaFlowto, V>>
fn aria_flowto(self, value: V) -> Self::Output<Attr<AriaFlowto, V>>
Identifies the next element (or elements) in an alternate reading order of content.
ยงfn aria_grabbed(self, value: V) -> Self::Output<Attr<AriaGrabbed, V>>
fn aria_grabbed(self, value: V) -> Self::Output<Attr<AriaGrabbed, V>>
Indicates an elementโs โgrabbedโ state in a drag-and-drop operation.
ยงfn aria_haspopup(self, value: V) -> Self::Output<Attr<AriaHaspopup, V>>
fn aria_haspopup(self, value: V) -> Self::Output<Attr<AriaHaspopup, V>>
Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
Indicates whether the element is exposed to an accessibility API.
ยงfn aria_invalid(self, value: V) -> Self::Output<Attr<AriaInvalid, V>>
fn aria_invalid(self, value: V) -> Self::Output<Attr<AriaInvalid, V>>
Indicates the entered value does not conform to the format expected by the application.
ยงfn aria_keyshortcuts(self, value: V) -> Self::Output<Attr<AriaKeyshortcuts, V>>
fn aria_keyshortcuts(self, value: V) -> Self::Output<Attr<AriaKeyshortcuts, V>>
Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
ยงfn aria_label(self, value: V) -> Self::Output<Attr<AriaLabel, V>>
fn aria_label(self, value: V) -> Self::Output<Attr<AriaLabel, V>>
Defines a string value that labels the current element.
ยงfn aria_labelledby(self, value: V) -> Self::Output<Attr<AriaLabelledby, V>>
fn aria_labelledby(self, value: V) -> Self::Output<Attr<AriaLabelledby, V>>
Identifies the element (or elements) that labels the current element.
ยงfn aria_live(self, value: V) -> Self::Output<Attr<AriaLive, V>>
fn aria_live(self, value: V) -> Self::Output<Attr<AriaLive, V>>
Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
ยงfn aria_modal(self, value: V) -> Self::Output<Attr<AriaModal, V>>
fn aria_modal(self, value: V) -> Self::Output<Attr<AriaModal, V>>
Indicates whether an element is modal when displayed.
ยงfn aria_multiline(self, value: V) -> Self::Output<Attr<AriaMultiline, V>>
fn aria_multiline(self, value: V) -> Self::Output<Attr<AriaMultiline, V>>
Indicates whether a text box accepts multiple lines of input or only a single line.
ยงfn aria_multiselectable(
self,
value: V,
) -> Self::Output<Attr<AriaMultiselectable, V>>
fn aria_multiselectable( self, value: V, ) -> Self::Output<Attr<AriaMultiselectable, V>>
Indicates that the user may select more than one item from the current selectable descendants.
ยงfn aria_orientation(self, value: V) -> Self::Output<Attr<AriaOrientation, V>>
fn aria_orientation(self, value: V) -> Self::Output<Attr<AriaOrientation, V>>
Indicates whether the elementโs orientation is horizontal, vertical, or undefined.
ยงfn aria_owns(self, value: V) -> Self::Output<Attr<AriaOwns, V>>
fn aria_owns(self, value: V) -> Self::Output<Attr<AriaOwns, V>>
Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
ยงfn aria_placeholder(self, value: V) -> Self::Output<Attr<AriaPlaceholder, V>>
fn aria_placeholder(self, value: V) -> Self::Output<Attr<AriaPlaceholder, V>>
Defines a short hint (a word or short phrase) intended to help the user with data entry when the control has no value.
ยงfn aria_posinset(self, value: V) -> Self::Output<Attr<AriaPosinset, V>>
fn aria_posinset(self, value: V) -> Self::Output<Attr<AriaPosinset, V>>
Defines an elementโs number or position in the current set of listitems or treeitems.
ยงfn aria_pressed(self, value: V) -> Self::Output<Attr<AriaPressed, V>>
fn aria_pressed(self, value: V) -> Self::Output<Attr<AriaPressed, V>>
Indicates the current โpressedโ state of toggle buttons.
ยงfn aria_readonly(self, value: V) -> Self::Output<Attr<AriaReadonly, V>>
fn aria_readonly(self, value: V) -> Self::Output<Attr<AriaReadonly, V>>
Indicates that the element is not editable, but is otherwise operable.
ยงfn aria_relevant(self, value: V) -> Self::Output<Attr<AriaRelevant, V>>
fn aria_relevant(self, value: V) -> Self::Output<Attr<AriaRelevant, V>>
Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
ยงfn aria_required(self, value: V) -> Self::Output<Attr<AriaRequired, V>>
fn aria_required(self, value: V) -> Self::Output<Attr<AriaRequired, V>>
Indicates that user input is required on the element before a form may be submitted.
ยงfn aria_roledescription(
self,
value: V,
) -> Self::Output<Attr<AriaRoledescription, V>>
fn aria_roledescription( self, value: V, ) -> Self::Output<Attr<AriaRoledescription, V>>
Defines a human-readable, author-localized description for the role of an element.
ยงfn aria_rowcount(self, value: V) -> Self::Output<Attr<AriaRowcount, V>>
fn aria_rowcount(self, value: V) -> Self::Output<Attr<AriaRowcount, V>>
Defines the total number of rows in a table, grid, or treegrid.
ยงfn aria_rowindex(self, value: V) -> Self::Output<Attr<AriaRowindex, V>>
fn aria_rowindex(self, value: V) -> Self::Output<Attr<AriaRowindex, V>>
Defines an elementโs row index or position with respect to the total number of rows within a table, grid, or treegrid.
ยงfn aria_rowspan(self, value: V) -> Self::Output<Attr<AriaRowspan, V>>
fn aria_rowspan(self, value: V) -> Self::Output<Attr<AriaRowspan, V>>
Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
ยงfn aria_selected(self, value: V) -> Self::Output<Attr<AriaSelected, V>>
fn aria_selected(self, value: V) -> Self::Output<Attr<AriaSelected, V>>
Indicates the current โselectedโ state of various widgets.
ยงfn aria_setsize(self, value: V) -> Self::Output<Attr<AriaSetsize, V>>
fn aria_setsize(self, value: V) -> Self::Output<Attr<AriaSetsize, V>>
Defines the number of items in the current set of listitems or treeitems.
ยงfn aria_sort(self, value: V) -> Self::Output<Attr<AriaSort, V>>
fn aria_sort(self, value: V) -> Self::Output<Attr<AriaSort, V>>
Indicates if items in a table or grid are sorted in ascending or descending order.
ยงfn aria_valuemax(self, value: V) -> Self::Output<Attr<AriaValuemax, V>>
fn aria_valuemax(self, value: V) -> Self::Output<Attr<AriaValuemax, V>>
Defines the maximum allowed value for a range widget.
ยงfn aria_valuemin(self, value: V) -> Self::Output<Attr<AriaValuemin, V>>
fn aria_valuemin(self, value: V) -> Self::Output<Attr<AriaValuemin, V>>
Defines the minimum allowed value for a range widget.
ยงfn aria_valuenow(self, value: V) -> Self::Output<Attr<AriaValuenow, V>>
fn aria_valuenow(self, value: V) -> Self::Output<Attr<AriaValuenow, V>>
Defines the current value for a range widget.
ยงfn aria_valuetext(self, value: V) -> Self::Output<Attr<AriaValuetext, V>>
fn aria_valuetext(self, value: V) -> Self::Output<Attr<AriaValuetext, V>>
Defines the human-readable text alternative of
aria-valuenow
for a range widget.ยงimpl Ord for Dom
impl Ord for Dom
ยงimpl PartialOrd for Dom
impl PartialOrd for Dom
impl Copy for Dom
impl Eq for Dom
impl StructuralPartialEq for Dom
Auto Trait Implementationsยง
impl Freeze for Dom
impl RefUnwindSafe for Dom
impl Send for Dom
impl Sync for Dom
impl Unpin for Dom
impl UnwindSafe for Dom
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>,
Convert the source color to the destination color using the specified
method.
Sourceยงfn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default.
ยงimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
ยงtype ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
ยงfn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Cast a collection of colors into a collection of arrays.
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
Cast this collection of arrays into a collection of colors.
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
Mutably borrows from an owned value. Read more
ยงimpl<T> CallHasher for T
impl<T> CallHasher for 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
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
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
ยงimpl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
Cast a collection of colors into a collection of color components.
ยงimpl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
ยงfn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
โs vtable from &Trait
โs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
โs vtable from &mut Trait
โs.ยงimpl<T> DowncastSend for T
impl<T> DowncastSend for T
ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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
Performs a conversion from
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
Converts
other
into Self
, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> 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
Performs a conversion into
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
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
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 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
Convert into T with values clamped to the color defined bounds Read more
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
Convert into T. The resulting color might be invalid in its color space Read more
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> โ
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 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> โ
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 moreSourceยงimpl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Sourceยงfn into_stimulus(self) -> T
fn into_stimulus(self) -> T
Converts
self
into T
, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> Pointable for T
impl<T> Pointable for T
ยงimpl<T> Pointee for T
impl<T> Pointee for T
ยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
ยงimpl<T> SerializableKey for T
impl<T> SerializableKey for T
ยงimpl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
ยงfn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
ยงfn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.
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
The error for when
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>
Try to cast this collection of color components into a collection of
colors. Read more
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>>
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 moreSourceยงimpl<C, U> UintsFrom<C> for Uwhere
C: IntoUints<U>,
impl<C, U> UintsFrom<C> for Uwhere
C: IntoUints<U>,
Sourceยงfn uints_from(colors: C) -> U
fn uints_from(colors: C) -> U
Cast a collection of colors into a collection of unsigned integers.
Sourceยงimpl<C, U> UintsInto<C> for Uwhere
C: FromUints<U>,
impl<C, U> UintsInto<C> for Uwhere
C: FromUints<U>,
Sourceยงfn uints_into(self) -> C
fn uints_into(self) -> C
Cast this collection of unsigned integers into a collection of colors.