Files
phy/epaint/struct.Color32.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

77 lines
84 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This format is used for space-efficient color representation (32 bits)."><title>Color32 in epaint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="epaint" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../epaint/index.html">epaint</a><span class="version">0.30.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Color32</a></h2><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.BLACK" title="BLACK">BLACK</a></li><li><a href="#associatedconstant.BLUE" title="BLUE">BLUE</a></li><li><a href="#associatedconstant.BROWN" title="BROWN">BROWN</a></li><li><a href="#associatedconstant.DARK_BLUE" title="DARK_BLUE">DARK_BLUE</a></li><li><a href="#associatedconstant.DARK_GRAY" title="DARK_GRAY">DARK_GRAY</a></li><li><a href="#associatedconstant.DARK_GREEN" title="DARK_GREEN">DARK_GREEN</a></li><li><a href="#associatedconstant.DARK_RED" title="DARK_RED">DARK_RED</a></li><li><a href="#associatedconstant.DEBUG_COLOR" title="DEBUG_COLOR">DEBUG_COLOR</a></li><li><a href="#associatedconstant.GOLD" title="GOLD">GOLD</a></li><li><a href="#associatedconstant.GRAY" title="GRAY">GRAY</a></li><li><a href="#associatedconstant.GREEN" title="GREEN">GREEN</a></li><li><a href="#associatedconstant.KHAKI" title="KHAKI">KHAKI</a></li><li><a href="#associatedconstant.LIGHT_BLUE" title="LIGHT_BLUE">LIGHT_BLUE</a></li><li><a href="#associatedconstant.LIGHT_GRAY" title="LIGHT_GRAY">LIGHT_GRAY</a></li><li><a href="#associatedconstant.LIGHT_GREEN" title="LIGHT_GREEN">LIGHT_GREEN</a></li><li><a href="#associatedconstant.LIGHT_RED" title="LIGHT_RED">LIGHT_RED</a></li><li><a href="#associatedconstant.LIGHT_YELLOW" title="LIGHT_YELLOW">LIGHT_YELLOW</a></li><li><a href="#associatedconstant.ORANGE" title="ORANGE">ORANGE</a></li><li><a href="#associatedconstant.PLACEHOLDER" title="PLACEHOLDER">PLACEHOLDER</a></li><li><a href="#associatedconstant.RED" title="RED">RED</a></li><li><a href="#associatedconstant.TEMPORARY_COLOR" title="TEMPORARY_COLOR">TEMPORARY_COLOR</a></li><li><a href="#associatedconstant.TRANSPARENT" title="TRANSPARENT">TRANSPARENT</a></li><li><a href="#associatedconstant.WHITE" title="WHITE">WHITE</a></li><li><a href="#associatedconstant.YELLOW" title="YELLOW">YELLOW</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.a" title="a">a</a></li><li><a href="#method.additive" title="additive">additive</a></li><li><a href="#method.b" title="b">b</a></li><li><a href="#method.from_additive_luminance" title="from_additive_luminance">from_additive_luminance</a></li><li><a href="#method.from_black_alpha" title="from_black_alpha">from_black_alpha</a></li><li><a href="#method.from_gray" title="from_gray">from_gray</a></li><li><a href="#method.from_hex" title="from_hex">from_hex</a></li><li><a href="#method.from_rgb" title="from_rgb">from_rgb</a></li><li><a href="#method.from_rgb_additive" title="from_rgb_additive">from_rgb_additive</a></li><li><a href="#method.from_rgba_premultiplied" title="from_rgba_premultiplied">from_rgba_premultiplied</a></li><li><a href="#method.from_rgba_unmultiplied" title="from_rgba_unmultiplied">from_rgba_unmultiplied</a></li><li><a href="#method.from_white_alpha" title="from_white_alpha">from_white_alpha</a></li><li><a href="#method.g" title="g">g</a></li><li><a href="#method.gamma_multiply" title="gamma_multiply">gamma_multiply</a></li><li><a href="#method.is_additive" title="is_additive">is_additive</a></li><li><a href="#method.is_opaque" title="is_opaque">is_opaque</a></li><li><a href="#method.lerp_to_gamma" title="lerp_to_gamma">lerp_to_gamma</a></li><li><a href="#method.linear_multiply" title="linear_multiply">linear_multiply</a></li><li><a href="#method.r" title="r">r</a></li><li><a href="#method.to_array" title="to_array">to_array</a></li><li><a href="#method.to_hex" title="to_hex">to_hex</a></li><li><a href="#method.to_normalized_gamma_f32" title="to_normalized_gamma_f32">to_normalized_gamma_f32</a></li><li><a href="#method.to_opaque" title="to_opaque">to_opaque</a></li><li><a href="#method.to_srgba_unmultiplied" title="to_srgba_unmultiplied">to_srgba_unmultiplied</a></li><li><a href="#method.to_tuple" title="to_tuple">to_tuple</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Color32" title="Clone">Clone</a></li><li><a href="#impl-Copy-for-Color32" title="Copy">Copy</a></li><li><a href="#impl-Debug-for-Color32" title="Debug">Debug</a></li><li><a href="#impl-Default-for-Color32" title="Default">Default</a></li><li><a href="#impl-Eq-for-Color32" title="Eq">Eq</a></li><li><a href="#impl-From%3CColor32%3E-for-Hsva" title="From&#60;Color32&#62;">From&#60;Color32&#62;</a></li><li><a href="#impl-From%3CColor32%3E-for-HsvaGamma" title="From&#60;Color32&#62;">From&#60;Color32&#62;</a></li><li><a href="#impl-From%3CColor32%3E-for-Rgba" title="From&#60;Color32&#62;">From&#60;Color32&#62;</a></li><li><a href="#impl-From%3CHsva%3E-for-Color32" title="From&#60;Hsva&#62;">From&#60;Hsva&#62;</a></li><li><a href="#impl-From%3CHsvaGamma%3E-for-Color32" title="From&#60;HsvaGamma&#62;">From&#60;HsvaGamma&#62;</a></li><li><a href="#impl-From%3CRgba%3E-for-Color32" title="From&#60;Rgba&#62;">From&#60;Rgba&#62;</a></li><li><a href="#impl-Hash-for-Color32" title="Hash">Hash</a></li><li><a href="#impl-Index%3Cusize%3E-for-Color32" title="Index&#60;usize&#62;">Index&#60;usize&#62;</a></li><li><a href="#impl-IndexMut%3Cusize%3E-for-Color32" title="IndexMut&#60;usize&#62;">IndexMut&#60;usize&#62;</a></li><li><a href="#impl-Mul-for-Color32" title="Mul">Mul</a></li><li><a href="#impl-PartialEq-for-Color32" title="PartialEq">PartialEq</a></li><li><a href="#impl-Pod-for-Color32" title="Pod">Pod</a></li><li><a href="#impl-StructuralPartialEq-for-Color32" title="StructuralPartialEq">StructuralPartialEq</a></li><li><a href="#impl-Zeroable-for-Color32" title="Zeroable">Zeroable</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Color32" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Color32" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Color32" title="Send">Send</a></li><li><a href="#impl-Sync-for-Color32" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Color32" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Color32" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-AnyBitPattern-for-T" title="AnyBitPattern">AnyBitPattern</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CheckedBitPattern-for-T" title="CheckedBitPattern">CheckedBitPattern</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-NoUninit-for-T" title="NoUninit">NoUninit</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate epaint</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">epaint</a></span><h1>Struct <span class="struct">Color32</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/ecolor/color32.rs.html#16">Source</a> </span></div><pre class="rust item-decl"><code><div class="code-attribute">#[repr(C)]</div>pub struct Color32(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This format is used for space-efficient color representation (32 bits).</p>
<p>Instead of manipulating this directly it is often better
to first convert it to either <a href="struct.Rgba.html" title="struct epaint::Rgba"><code>Rgba</code></a> or <a href="struct.Hsva.html" title="struct epaint::Hsva"><code>crate::Hsva</code></a>.</p>
<p>Internally this uses 0-255 gamma space <code>sRGBA</code> color with premultiplied alpha.
Alpha channel is in linear space.</p>
<p>The special value of alpha=0 means the color is to be treated as an additive color.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#41">Source</a><a href="#impl-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><section id="associatedconstant.TRANSPARENT" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#44">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.TRANSPARENT" class="constant">TRANSPARENT</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.BLACK" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#45">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.BLACK" class="constant">BLACK</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.DARK_GRAY" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#47">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.DARK_GRAY" class="constant">DARK_GRAY</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.GRAY" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#49">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.GRAY" class="constant">GRAY</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.LIGHT_GRAY" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#51">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.LIGHT_GRAY" class="constant">LIGHT_GRAY</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.WHITE" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#52">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.WHITE" class="constant">WHITE</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.BROWN" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#54">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.BROWN" class="constant">BROWN</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.DARK_RED" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#55">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.DARK_RED" class="constant">DARK_RED</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.RED" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#56">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.RED" class="constant">RED</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.LIGHT_RED" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#57">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.LIGHT_RED" class="constant">LIGHT_RED</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.YELLOW" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#59">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.YELLOW" class="constant">YELLOW</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.ORANGE" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#60">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.ORANGE" class="constant">ORANGE</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.LIGHT_YELLOW" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#61">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.LIGHT_YELLOW" class="constant">LIGHT_YELLOW</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.KHAKI" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#62">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.KHAKI" class="constant">KHAKI</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.DARK_GREEN" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#64">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.DARK_GREEN" class="constant">DARK_GREEN</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.GREEN" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#65">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.GREEN" class="constant">GREEN</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.LIGHT_GREEN" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#66">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.LIGHT_GREEN" class="constant">LIGHT_GREEN</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.DARK_BLUE" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#68">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.DARK_BLUE" class="constant">DARK_BLUE</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.BLUE" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#69">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.BLUE" class="constant">BLUE</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.LIGHT_BLUE" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#70">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.LIGHT_BLUE" class="constant">LIGHT_BLUE</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.GOLD" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#72">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.GOLD" class="constant">GOLD</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><section id="associatedconstant.DEBUG_COLOR" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#74">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.DEBUG_COLOR" class="constant">DEBUG_COLOR</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section><details class="toggle" open><summary><section id="associatedconstant.PLACEHOLDER" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#83">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.PLACEHOLDER" class="constant">PLACEHOLDER</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = _</h4></section></summary><div class="docblock"><p>An ugly color that is planned to be replaced before making it to the screen.</p>
<p>This is an invalid color, in that it does not correspond to a valid multiplied color,
nor to an additive color.</p>
<p>This is used as a special color key,
i.e. often taken to mean “no color”.</p>
</div></details><section id="associatedconstant.TEMPORARY_COLOR" class="associatedconstant"><a class="src rightside" href="../src/ecolor/color32.rs.html#86">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.TEMPORARY_COLOR" class="constant">TEMPORARY_COLOR</a>: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a> = Self::PLACEHOLDER</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Renamed to PLACEHOLDER</span></div></span><section id="method.from_rgb" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#89">Source</a><h4 class="code-header">pub const fn <a href="#method.from_rgb" class="fn">from_rgb</a>(r: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, g: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section><section id="method.from_rgb_additive" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#94">Source</a><h4 class="code-header">pub const fn <a href="#method.from_rgb_additive" class="fn">from_rgb_additive</a>(r: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, g: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.from_rgba_premultiplied" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#100">Source</a><h4 class="code-header">pub const fn <a href="#method.from_rgba_premultiplied" class="fn">from_rgba_premultiplied</a>(r: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, g: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, a: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class="docblock"><p>From <code>sRGBA</code> with premultiplied alpha.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_rgba_unmultiplied" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#106">Source</a><h4 class="code-header">pub fn <a href="#method.from_rgba_unmultiplied" class="fn">from_rgba_unmultiplied</a>(r: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, g: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, a: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class="docblock"><p>From <code>sRGBA</code> WITHOUT premultiplied alpha.</p>
</div></details><section id="method.from_gray" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#136">Source</a><h4 class="code-header">pub const fn <a href="#method.from_gray" class="fn">from_gray</a>(l: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section><section id="method.from_black_alpha" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#141">Source</a><h4 class="code-header">pub const fn <a href="#method.from_black_alpha" class="fn">from_black_alpha</a>(a: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section><section id="method.from_white_alpha" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#146">Source</a><h4 class="code-header">pub fn <a href="#method.from_white_alpha" class="fn">from_white_alpha</a>(a: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section><section id="method.from_additive_luminance" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#151">Source</a><h4 class="code-header">pub const fn <a href="#method.from_additive_luminance" class="fn">from_additive_luminance</a>(l: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section><section id="method.is_opaque" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#156">Source</a><h4 class="code-header">pub const fn <a href="#method.is_opaque" class="fn">is_opaque</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="method.r" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#161">Source</a><h4 class="code-header">pub const fn <a href="#method.r" class="fn">r</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a></h4></section><section id="method.g" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#166">Source</a><h4 class="code-header">pub const fn <a href="#method.g" class="fn">g</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a></h4></section><section id="method.b" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#171">Source</a><h4 class="code-header">pub const fn <a href="#method.b" class="fn">b</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a></h4></section><section id="method.a" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#176">Source</a><h4 class="code-header">pub const fn <a href="#method.a" class="fn">a</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.to_opaque" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#182">Source</a><h4 class="code-header">pub fn <a href="#method.to_opaque" class="fn">to_opaque</a>(self) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class="docblock"><p>Returns an opaque version of self</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.additive" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#188">Source</a><h4 class="code-header">pub const fn <a href="#method.additive" class="fn">additive</a>(self) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class="docblock"><p>Returns an additive version of self</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_additive" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#195">Source</a><h4 class="code-header">pub fn <a href="#method.is_additive" class="fn">is_additive</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Is the alpha=0 ?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_array" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#201">Source</a><h4 class="code-header">pub const fn <a href="#method.to_array" class="fn">to_array</a>(&amp;self) -&gt; [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>]</h4></section></summary><div class="docblock"><p>Premultiplied RGBA</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_tuple" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#207">Source</a><h4 class="code-header">pub const fn <a href="#method.to_tuple" class="fn">to_tuple</a>(&amp;self) -&gt; (<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)</h4></section></summary><div class="docblock"><p>Premultiplied RGBA</p>
</div></details><section id="method.to_srgba_unmultiplied" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#212">Source</a><h4 class="code-header">pub fn <a href="#method.to_srgba_unmultiplied" class="fn">to_srgba_unmultiplied</a>(&amp;self) -&gt; [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>]</h4></section><details class="toggle method-toggle" open><summary><section id="method.gamma_multiply" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#222">Source</a><h4 class="code-header">pub fn <a href="#method.gamma_multiply" class="fn">gamma_multiply</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class="docblock"><p>Multiply with 0.5 to make color half as opaque, perceptually.</p>
<p>Fast multiplication in gamma-space.</p>
<p>This is perceptually even, and faster that <a href="struct.Color32.html#method.linear_multiply" title="method epaint::Color32::linear_multiply"><code>Self::linear_multiply</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.linear_multiply" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#238">Source</a><h4 class="code-header">pub fn <a href="#method.linear_multiply" class="fn">linear_multiply</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class="docblock"><p>Multiply with 0.5 to make color half as opaque in linear space.</p>
<p>This is using linear space, which is not perceptually even.
You likely want to use <a href="struct.Color32.html#method.gamma_multiply" title="method epaint::Color32::gamma_multiply"><code>Self::gamma_multiply</code></a> instead.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_normalized_gamma_f32" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#250">Source</a><h4 class="code-header">pub fn <a href="#method.to_normalized_gamma_f32" class="fn">to_normalized_gamma_f32</a>(self) -&gt; [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>]</h4></section></summary><div class="docblock"><p>Converts to floating point values in the range 0-1 without any gamma space conversion.</p>
<p>Use this with great care! In almost all cases, you want to convert to <a href="struct.Rgba.html" title="struct epaint::Rgba"><code>crate::Rgba</code></a> instead
in order to obtain linear space color values.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lerp_to_gamma" class="method"><a class="src rightside" href="../src/ecolor/color32.rs.html#261">Source</a><h4 class="code-header">pub fn <a href="#method.lerp_to_gamma" class="fn">lerp_to_gamma</a>(&amp;self, other: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>, t: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class="docblock"><p>Lerp this color towards <code>other</code> by <code>t</code> in gamma space.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Color32-1" class="impl"><a class="src rightside" href="../src/ecolor/hex_color_runtime.rs.html#120">Source</a><a href="#impl-Color32-1" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_hex" class="method"><a class="src rightside" href="../src/ecolor/hex_color_runtime.rs.html#142">Source</a><h4 class="code-header">pub fn <a href="#method.from_hex" class="fn">from_hex</a>(hex: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>, <a class="enum" href="../ecolor/hex_color_runtime/enum.ParseHexColorError.html" title="enum ecolor::hex_color_runtime::ParseHexColorError">ParseHexColorError</a>&gt;</h4></section></summary><div class="docblock"><p>Parses a color from a hex string.</p>
<p>Supports the 3, 4, 6, and 8-digit formats, according to the specification in
<a href="https://drafts.csswg.org/css-color-4/#hex-color">https://drafts.csswg.org/css-color-4/#hex-color</a></p>
<p>To parse hex colors from string literals with compile-time checking, use the macro
[<code>crate::hex_color!</code>] instead.</p>
<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ecolor::Color32;
<span class="macro">assert_eq!</span>(<span class="prelude-val">Ok</span>(Color32::RED), Color32::from_hex(<span class="string">"#ff0000"</span>));
<span class="macro">assert_eq!</span>(<span class="prelude-val">Ok</span>(Color32::GREEN), Color32::from_hex(<span class="string">"#00ff00ff"</span>));
<span class="macro">assert_eq!</span>(<span class="prelude-val">Ok</span>(Color32::BLUE), Color32::from_hex(<span class="string">"#00f"</span>));
<span class="macro">assert_eq!</span>(<span class="prelude-val">Ok</span>(Color32::TRANSPARENT), Color32::from_hex(<span class="string">"#0000"</span>));</code></pre></div>
<h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5>
<p>Returns an error if the string doesnt start with the hash <code>#</code> character, if the remaining
length does not correspond to one of the standard formats (3, 4, 6, or 8), if it contains
non-hex characters.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_hex" class="method"><a class="src rightside" href="../src/ecolor/hex_color_runtime.rs.html#161">Source</a><h4 class="code-header">pub fn <a href="#method.to_hex" class="fn">to_hex</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Formats the color as a hex string.</p>
<h5 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ecolor::Color32;
<span class="macro">assert_eq!</span>(Color32::RED.to_hex(), <span class="string">"#ff0000ff"</span>);
<span class="macro">assert_eq!</span>(Color32::GREEN.to_hex(), <span class="string">"#00ff00ff"</span>);
<span class="macro">assert_eq!</span>(Color32::BLUE.to_hex(), <span class="string">"#0000ffff"</span>);
<span class="macro">assert_eq!</span>(Color32::TRANSPARENT.to_hex(), <span class="string">"#00000000"</span>);</code></pre></div>
<p>Uses the 8-digit format described in <a href="https://drafts.csswg.org/css-color-4/#hex-color">https://drafts.csswg.org/css-color-4/#hex-color</a>,
as that is the only format that is lossless.
For other formats, see <a href="../ecolor/hex_color_runtime/enum.HexColor.html" title="enum ecolor::hex_color_runtime::HexColor"><code>HexColor</code></a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#impl-Clone-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#174">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#18">Source</a><a href="#impl-Debug-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#19">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#impl-Default-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.84.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CColor32%3E-for-Hsva" class="impl"><a class="src rightside" href="../src/ecolor/hsva.rs.html#198">Source</a><a href="#impl-From%3CColor32%3E-for-Hsva" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>&gt; for <a class="struct" href="struct.Hsva.html" title="struct epaint::Hsva">Hsva</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../src/ecolor/hsva.rs.html#200">Source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(srgba: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>) -&gt; <a class="struct" href="struct.Hsva.html" title="struct epaint::Hsva">Hsva</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CColor32%3E-for-HsvaGamma" class="impl"><a class="src rightside" href="../src/ecolor/hsva_gamma.rs.html#50">Source</a><a href="#impl-From%3CColor32%3E-for-HsvaGamma" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>&gt; for <a class="struct" href="struct.HsvaGamma.html" title="struct epaint::HsvaGamma">HsvaGamma</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../src/ecolor/hsva_gamma.rs.html#51">Source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(srgba: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>) -&gt; <a class="struct" href="struct.HsvaGamma.html" title="struct epaint::HsvaGamma">HsvaGamma</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CColor32%3E-for-Rgba" class="impl"><a class="src rightside" href="../src/ecolor/lib.rs.html#40">Source</a><a href="#impl-From%3CColor32%3E-for-Rgba" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>&gt; for <a class="struct" href="struct.Rgba.html" title="struct epaint::Rgba">Rgba</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="../src/ecolor/lib.rs.html#41">Source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(srgba: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>) -&gt; <a class="struct" href="struct.Rgba.html" title="struct epaint::Rgba">Rgba</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHsva%3E-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/hsva.rs.html#191">Source</a><a href="#impl-From%3CHsva%3E-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Hsva.html" title="struct epaint::Hsva">Hsva</a>&gt; for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../src/ecolor/hsva.rs.html#193">Source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(hsva: <a class="struct" href="struct.Hsva.html" title="struct epaint::Hsva">Hsva</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHsvaGamma%3E-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/hsva_gamma.rs.html#26">Source</a><a href="#impl-From%3CHsvaGamma%3E-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.HsvaGamma.html" title="struct epaint::HsvaGamma">HsvaGamma</a>&gt; for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../src/ecolor/hsva_gamma.rs.html#27">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(hsvag: <a class="struct" href="struct.HsvaGamma.html" title="struct epaint::HsvaGamma">HsvaGamma</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CRgba%3E-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/lib.rs.html#51">Source</a><a href="#impl-From%3CRgba%3E-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="struct.Rgba.html" title="struct epaint::Rgba">Rgba</a>&gt; for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a class="src rightside" href="../src/ecolor/lib.rs.html#52">Source</a><a href="#method.from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(rgba: <a class="struct" href="struct.Rgba.html" title="struct epaint::Rgba">Rgba</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#impl-Hash-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a>&lt;__H&gt;(&amp;self, state: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut __H</a>)<div class="where">where
__H: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/hash/mod.rs.html#235-237">Source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a>&lt;H&gt;(data: &amp;[Self], state: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut H</a>)<div class="where">where
H: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3Cusize%3E-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#25">Source</a><a href="#impl-Index%3Cusize%3E-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>&gt; for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#26">Source</a><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index" class="method trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#29">Source</a><a href="#method.index" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&amp;self, index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.84.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3Cusize%3E-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#34">Source</a><a href="#impl-IndexMut%3Cusize%3E-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>&gt; for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut" class="method trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#36">Source</a><a href="#method.index_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>) -&gt; &amp;mut <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.84.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Mul-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#273">Source</a><a href="#impl-Mul-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.mul" class="method trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#278">Source</a><a href="#method.mul" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Mul.html#tymethod.mul" class="fn">mul</a>(self, other: <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>) -&gt; <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class="docblock"><p>Fast gamma-space multiplication.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#274">Source</a><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Mul.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#impl-PartialEq-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&amp;self, other: &amp;<a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#261">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Zeroable-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#15">Source</a><a href="#impl-Zeroable-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../bytemuck/zeroable/trait.Zeroable.html" title="trait bytemuck::zeroable::Zeroable">Zeroable</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.zeroed" class="method trait-impl"><a class="src rightside" href="../src/bytemuck/zeroable.rs.html#32">Source</a><a href="#method.zeroed" class="anchor">§</a><h4 class="code-header">fn <a href="../bytemuck/zeroable/trait.Zeroable.html#method.zeroed" class="fn">zeroed</a>() -&gt; Self</h4></section></summary><div class='docblock'>Calls <a href="https://doc.rust-lang.org/1.84.0/core/mem/fn.zeroed.html" title="fn core::mem::zeroed"><code>zeroed</code></a>. <a href="../bytemuck/zeroable/trait.Zeroable.html#method.zeroed">Read more</a></div></details></div></details><section id="impl-Copy-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#impl-Copy-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section><section id="impl-Eq-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#impl-Eq-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section><section id="impl-Pod-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#15">Source</a><a href="#impl-Pod-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../bytemuck/pod/trait.Pod.html" title="trait bytemuck::pod::Pod">Pod</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section><section id="impl-StructuralPartialEq-for-Color32" class="impl"><a class="src rightside" href="../src/ecolor/color32.rs.html#13">Source</a><a href="#impl-StructuralPartialEq-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Color32" class="impl"><a href="#impl-Freeze-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section><section id="impl-RefUnwindSafe-for-Color32" class="impl"><a href="#impl-RefUnwindSafe-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section><section id="impl-Send-for-Color32" class="impl"><a href="#impl-Send-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section><section id="impl-Sync-for-Color32" class="impl"><a href="#impl-Sync-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section><section id="impl-Unpin-for-Color32" class="impl"><a href="#impl-Unpin-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section><section id="impl-UnwindSafe-for-Color32" class="impl"><a href="#impl-UnwindSafe-for-Color32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Color32.html" title="struct epaint::Color32">Color32</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CheckedBitPattern-for-T" class="impl"><a class="src rightside" href="../src/bytemuck/checked.rs.html#143">Source</a><a href="#impl-CheckedBitPattern-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../bytemuck/checked/trait.CheckedBitPattern.html" title="trait bytemuck::checked::CheckedBitPattern">CheckedBitPattern</a> for T<div class="where">where
T: <a class="trait" href="../bytemuck/anybitpattern/trait.AnyBitPattern.html" title="trait bytemuck::anybitpattern::AnyBitPattern">AnyBitPattern</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Bits" class="associatedtype trait-impl"><a class="src rightside" href="../src/bytemuck/checked.rs.html#144">Source</a><a href="#associatedtype.Bits" class="anchor">§</a><h4 class="code-header">type <a href="../bytemuck/checked/trait.CheckedBitPattern.html#associatedtype.Bits" class="associatedtype">Bits</a> = T</h4></section></summary><div class='docblock'><code>Self</code> <em>must</em> have the same layout as the specified <code>Bits</code> except for
the possible invalid bit patterns being checked during
<a href="../bytemuck/checked/trait.CheckedBitPattern.html#tymethod.is_valid_bit_pattern" title="associated function bytemuck::checked::CheckedBitPattern::is_valid_bit_pattern"><code>is_valid_bit_pattern</code></a>.</div></details><details class="toggle method-toggle" open><summary><section id="method.is_valid_bit_pattern" class="method trait-impl"><a class="src rightside" href="../src/bytemuck/checked.rs.html#147">Source</a><a href="#method.is_valid_bit_pattern" class="anchor">§</a><h4 class="code-header">fn <a href="../bytemuck/checked/trait.CheckedBitPattern.html#tymethod.is_valid_bit_pattern" class="fn">is_valid_bit_pattern</a>(_bits: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;T</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>If this function returns true, then it must be valid to reinterpret <code>bits</code>
as <code>&amp;Self</code>.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#273">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#275">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&amp;self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dst</code>. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#82-84">Source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#86">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#87">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#91">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-AnyBitPattern-for-T" class="impl"><a class="src rightside" href="../src/bytemuck/anybitpattern.rs.html#56">Source</a><a href="#impl-AnyBitPattern-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../bytemuck/anybitpattern/trait.AnyBitPattern.html" title="trait bytemuck::anybitpattern::AnyBitPattern">AnyBitPattern</a> for T<div class="where">where
T: <a class="trait" href="../bytemuck/pod/trait.Pod.html" title="trait bytemuck::pod::Pod">Pod</a>,</div></h3></section><section id="impl-NoUninit-for-T" class="impl"><a class="src rightside" href="../src/bytemuck/no_uninit.rs.html#63">Source</a><a href="#impl-NoUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../bytemuck/no_uninit/trait.NoUninit.html" title="trait bytemuck::no_uninit::NoUninit">NoUninit</a> for T<div class="where">where
T: <a class="trait" href="../bytemuck/pod/trait.Pod.html" title="trait bytemuck::pod::Pod">Pod</a>,</div></h3></section></div></section></div></main></body></html>