131 lines
99 KiB
HTML
131 lines
99 KiB
HTML
<!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="A rectangular region of space."><title>Rect in emath - 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="emath" 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="../emath/index.html">emath</a><span class="version">0.30.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Rect</a></h2><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.max" title="max">max</a></li><li><a href="#structfield.min" title="min">min</a></li></ul><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.EVERYTHING" title="EVERYTHING">EVERYTHING</a></li><li><a href="#associatedconstant.NAN" title="NAN">NAN</a></li><li><a href="#associatedconstant.NOTHING" title="NOTHING">NOTHING</a></li><li><a href="#associatedconstant.ZERO" title="ZERO">ZERO</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.any_nan" title="any_nan">any_nan</a></li><li><a href="#method.area" title="area">area</a></li><li><a href="#method.aspect_ratio" title="aspect_ratio">aspect_ratio</a></li><li><a href="#method.bottom" title="bottom">bottom</a></li><li><a href="#method.bottom_mut" title="bottom_mut">bottom_mut</a></li><li><a href="#method.bottom_up_range" title="bottom_up_range">bottom_up_range</a></li><li><a href="#method.center" title="center">center</a></li><li><a href="#method.center_bottom" title="center_bottom">center_bottom</a></li><li><a href="#method.center_top" title="center_top">center_top</a></li><li><a href="#method.clamp" title="clamp">clamp</a></li><li><a href="#method.contains" title="contains">contains</a></li><li><a href="#method.contains_rect" title="contains_rect">contains_rect</a></li><li><a href="#method.distance_sq_to_pos" title="distance_sq_to_pos">distance_sq_to_pos</a></li><li><a href="#method.distance_to_pos" title="distance_to_pos">distance_to_pos</a></li><li><a href="#method.everything_above" title="everything_above">everything_above</a></li><li><a href="#method.everything_below" title="everything_below">everything_below</a></li><li><a href="#method.everything_left_of" title="everything_left_of">everything_left_of</a></li><li><a href="#method.everything_right_of" title="everything_right_of">everything_right_of</a></li><li><a href="#method.expand" title="expand">expand</a></li><li><a href="#method.expand2" title="expand2">expand2</a></li><li><a href="#method.extend_with" title="extend_with">extend_with</a></li><li><a href="#method.extend_with_x" title="extend_with_x">extend_with_x</a></li><li><a href="#method.extend_with_y" title="extend_with_y">extend_with_y</a></li><li><a href="#method.from_center_size" title="from_center_size">from_center_size</a></li><li><a href="#method.from_min_max" title="from_min_max">from_min_max</a></li><li><a href="#method.from_min_size" title="from_min_size">from_min_size</a></li><li><a href="#method.from_points" title="from_points">from_points</a></li><li><a href="#method.from_pos" title="from_pos">from_pos</a></li><li><a href="#method.from_two_pos" title="from_two_pos">from_two_pos</a></li><li><a href="#method.from_x_y_ranges" title="from_x_y_ranges">from_x_y_ranges</a></li><li><a href="#method.height" title="height">height</a></li><li><a href="#method.intersect" title="intersect">intersect</a></li><li><a href="#method.intersects" title="intersects">intersects</a></li><li><a href="#method.intersects_ray" title="intersects_ray">intersects_ray</a></li><li><a href="#method.intersects_ray_from_center" title="intersects_ray_from_center">intersects_ray_from_center</a></li><li><a href="#method.is_finite" title="is_finite">is_finite</a></li><li><a href="#method.is_negative" title="is_negative">is_negative</a></li><li><a href="#method.is_positive" title="is_positive">is_positive</a></li><li><a href="#method.left" title="left">left</a></li><li><a href="#method.left_bottom" title="left_bottom">left_bottom</a></li><li><a href="#method.left_center" title="left_center">left_center</a></li><li><a href="#method.left_mut" title="left_mut">left_mut</a></li><li><a href="#method.left_top" title="left_top">left_top</a></li><li><a href="#method.lerp_inside" title="lerp_inside">lerp_inside</a></li><li><a href="#method.lerp_towards" title="lerp_towards">lerp_towards</a></li><li><a href="#method.right" title="right">right</a></li><li><a href="#method.right_bottom" title="right_bottom">right_bottom</a></li><li><a href="#method.right_center" title="right_center">right_center</a></li><li><a href="#method.right_mut" title="right_mut">right_mut</a></li><li><a href="#method.right_top" title="right_top">right_top</a></li><li><a href="#method.rotate_bb" title="rotate_bb">rotate_bb</a></li><li><a href="#method.scale_from_center" title="scale_from_center">scale_from_center</a></li><li><a href="#method.scale_from_center2" title="scale_from_center2">scale_from_center2</a></li><li><a href="#method.set_bottom" title="set_bottom">set_bottom</a></li><li><a href="#method.set_center" title="set_center">set_center</a></li><li><a href="#method.set_height" title="set_height">set_height</a></li><li><a href="#method.set_left" title="set_left">set_left</a></li><li><a href="#method.set_right" title="set_right">set_right</a></li><li><a href="#method.set_top" title="set_top">set_top</a></li><li><a href="#method.set_width" title="set_width">set_width</a></li><li><a href="#method.shrink" title="shrink">shrink</a></li><li><a href="#method.shrink2" title="shrink2">shrink2</a></li><li><a href="#method.signed_distance_to_pos" title="signed_distance_to_pos">signed_distance_to_pos</a></li><li><a href="#method.size" title="size">size</a></li><li><a href="#method.split_left_right_at_fraction" title="split_left_right_at_fraction">split_left_right_at_fraction</a></li><li><a href="#method.split_left_right_at_x" title="split_left_right_at_x">split_left_right_at_x</a></li><li><a href="#method.split_top_bottom_at_fraction" title="split_top_bottom_at_fraction">split_top_bottom_at_fraction</a></li><li><a href="#method.split_top_bottom_at_y" title="split_top_bottom_at_y">split_top_bottom_at_y</a></li><li><a href="#method.square_proportions" title="square_proportions">square_proportions</a></li><li><a href="#method.top" title="top">top</a></li><li><a href="#method.top_mut" title="top_mut">top_mut</a></li><li><a href="#method.translate" title="translate">translate</a></li><li><a href="#method.union" title="union">union</a></li><li><a href="#method.width" title="width">width</a></li><li><a href="#method.with_max_x" title="with_max_x">with_max_x</a></li><li><a href="#method.with_max_y" title="with_max_y">with_max_y</a></li><li><a href="#method.with_min_x" title="with_min_x">with_min_x</a></li><li><a href="#method.with_min_y" title="with_min_y">with_min_y</a></li><li><a href="#method.x_range" title="x_range">x_range</a></li><li><a href="#method.y_range" title="y_range">y_range</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Rect" title="Clone">Clone</a></li><li><a href="#impl-Copy-for-Rect" title="Copy">Copy</a></li><li><a href="#impl-Debug-for-Rect" title="Debug">Debug</a></li><li><a href="#impl-Display-for-Rect" title="Display">Display</a></li><li><a href="#impl-Div%3Cf32%3E-for-Rect" title="Div<f32>">Div<f32></a></li><li><a href="#impl-Eq-for-Rect" title="Eq">Eq</a></li><li><a href="#impl-From%3C%5BPos2;+2%5D%3E-for-Rect" title="From<[Pos2; 2]>">From<[Pos2; 2]></a></li><li><a href="#impl-Mul%3CRect%3E-for-TSTransform" title="Mul<Rect>">Mul<Rect></a></li><li><a href="#impl-Mul%3CRect%3E-for-f32" title="Mul<Rect>">Mul<Rect></a></li><li><a href="#impl-Mul%3Cf32%3E-for-Rect" title="Mul<f32>">Mul<f32></a></li><li><a href="#impl-PartialEq-for-Rect" title="PartialEq">PartialEq</a></li><li><a href="#impl-Pod-for-Rect" title="Pod">Pod</a></li><li><a href="#impl-StructuralPartialEq-for-Rect" title="StructuralPartialEq">StructuralPartialEq</a></li><li><a href="#impl-Zeroable-for-Rect" 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-Rect" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Rect" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Rect" title="Send">Send</a></li><li><a href="#impl-Sync-for-Rect" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Rect" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Rect" 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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></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<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></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-ToString-for-T" title="ToString">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate emath</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">emath</a></span><h1>Struct <span class="struct">Rect</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/emath/rect.rs.html#24-30">Source</a> </span></div><pre class="rust item-decl"><code><div class="code-attribute">#[repr(C)]</div>pub struct Rect {
|
|
pub min: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>,
|
|
pub max: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>,
|
|
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A rectangular region of space.</p>
|
|
<p>Usually a <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a> has a positive (or zero) size,
|
|
and then <a href="struct.Rect.html#structfield.min" title="field emath::Rect::min"><code>Self::min</code></a> <code><=</code> <a href="struct.Rect.html#structfield.max" title="field emath::Rect::max"><code>Self::max</code></a>.
|
|
In these cases <a href="struct.Rect.html#structfield.min" title="field emath::Rect::min"><code>Self::min</code></a> is the left-top corner
|
|
and <a href="struct.Rect.html#structfield.max" title="field emath::Rect::max"><code>Self::max</code></a> is the right-bottom corner.</p>
|
|
<p>A rectangle is allowed to have a negative size, which happens when the order
|
|
of <code>min</code> and <code>max</code> are swapped. These are usually a sign of an error.</p>
|
|
<p>Normally the unit is points (logical pixels) in screen space coordinates.</p>
|
|
<p><code>Rect</code> does NOT implement <code>Default</code>, because there is no obvious default value.
|
|
<a href="struct.Rect.html#associatedconstant.ZERO" title="associated constant emath::Rect::ZERO"><code>Rect::ZERO</code></a> may seem reasonable, but when used as a bounding box, <a href="struct.Rect.html#associatedconstant.NOTHING" title="associated constant emath::Rect::NOTHING"><code>Rect::NOTHING</code></a>
|
|
is a better default - so be explicit instead!</p>
|
|
</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.min" class="structfield section-header"><a href="#structfield.min" class="anchor field">§</a><code>min: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></code></span><div class="docblock"><p>One of the corners of the rectangle, usually the left top one.</p>
|
|
</div><span id="structfield.max" class="structfield section-header"><a href="#structfield.max" class="anchor field">§</a><code>max: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></code></span><div class="docblock"><p>The other corner, opposing <a href="struct.Rect.html#structfield.min" title="field emath::Rect::min"><code>Self::min</code></a>. Usually the right bottom one.</p>
|
|
</div><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-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#32-502">Source</a><a href="#impl-Rect" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.EVERYTHING" class="associatedconstant"><a class="src rightside" href="../src/emath/rect.rs.html#34-37">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.EVERYTHING" class="constant">EVERYTHING</a>: Self = _</h4></section></summary><div class="docblock"><p>Infinite rectangle that contains every point.</p>
|
|
</div></details><details class="toggle" open><summary><section id="associatedconstant.NOTHING" class="associatedconstant"><a class="src rightside" href="../src/emath/rect.rs.html#54-57">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.NOTHING" class="constant">NOTHING</a>: Self = _</h4></section></summary><div class="docblock"><p>The inverse of <a href="struct.Rect.html#associatedconstant.EVERYTHING" title="associated constant emath::Rect::EVERYTHING"><code>Self::EVERYTHING</code></a>: stretches from positive infinity to negative infinity.
|
|
Contains no points.</p>
|
|
<p>This is useful as the seed for bounding boxes.</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">let </span><span class="kw-2">mut </span>rect = Rect::NOTHING;
|
|
<span class="macro">assert!</span>(rect.size() == Vec2::splat(-f32::INFINITY));
|
|
<span class="macro">assert!</span>(rect.contains(pos2(<span class="number">0.0</span>, <span class="number">0.0</span>)) == <span class="bool-val">false</span>);
|
|
rect.extend_with(pos2(<span class="number">2.0</span>, <span class="number">1.0</span>));
|
|
rect.extend_with(pos2(<span class="number">0.0</span>, <span class="number">3.0</span>));
|
|
<span class="macro">assert_eq!</span>(rect, Rect::from_min_max(pos2(<span class="number">0.0</span>, <span class="number">1.0</span>), pos2(<span class="number">2.0</span>, <span class="number">3.0</span>)))</code></pre></div>
|
|
</div></details><details class="toggle" open><summary><section id="associatedconstant.NAN" class="associatedconstant"><a class="src rightside" href="../src/emath/rect.rs.html#60-63">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.NAN" class="constant">NAN</a>: Self = _</h4></section></summary><div class="docblock"><p>An invalid <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a> filled with <a href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html#associatedconstant.NAN" title="associated constant f32::NAN"><code>f32::NAN</code></a>.</p>
|
|
</div></details><details class="toggle" open><summary><section id="associatedconstant.ZERO" class="associatedconstant"><a class="src rightside" href="../src/emath/rect.rs.html#66-69">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.ZERO" class="constant">ZERO</a>: Self = _</h4></section></summary><div class="docblock"><p>A <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a> filled with zeroes.</p>
|
|
</div></details><section id="method.from_min_max" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#72-74">Source</a><h4 class="code-header">pub const fn <a href="#method.from_min_max" class="fn">from_min_max</a>(min: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>, max: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>) -> Self</h4></section><details class="toggle method-toggle" open><summary><section id="method.from_min_size" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#78-83">Source</a><h4 class="code-header">pub fn <a href="#method.from_min_size" class="fn">from_min_size</a>(min: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>, size: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> Self</h4></section></summary><div class="docblock"><p>left-top corner plus a size (stretching right-down).</p>
|
|
</div></details><section id="method.from_center_size" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#86-91">Source</a><h4 class="code-header">pub fn <a href="#method.from_center_size" class="fn">from_center_size</a>(center: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>, size: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> Self</h4></section><section id="method.from_x_y_ranges" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#94-101">Source</a><h4 class="code-header">pub fn <a href="#method.from_x_y_ranges" class="fn">from_x_y_ranges</a>(
|
|
x_range: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.Rangef.html" title="struct emath::Rangef">Rangef</a>>,
|
|
y_range: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.Rangef.html" title="struct emath::Rangef">Rangef</a>>,
|
|
) -> Self</h4></section><details class="toggle method-toggle" open><summary><section id="method.from_two_pos" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#105-110">Source</a><h4 class="code-header">pub fn <a href="#method.from_two_pos" class="fn">from_two_pos</a>(a: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>, b: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>) -> Self</h4></section></summary><div class="docblock"><p>Returns the bounding rectangle of the two points.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_pos" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#114-119">Source</a><h4 class="code-header">pub fn <a href="#method.from_pos" class="fn">from_pos</a>(point: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>) -> Self</h4></section></summary><div class="docblock"><p>A zero-sized rect at a specific point.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_points" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#122-128">Source</a><h4 class="code-header">pub fn <a href="#method.from_points" class="fn">from_points</a>(points: &[<a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>]) -> Self</h4></section></summary><div class="docblock"><p>Bounding-box around the points.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.everything_right_of" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#132-136">Source</a><h4 class="code-header">pub fn <a href="#method.everything_right_of" class="fn">everything_right_of</a>(left_x: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class="docblock"><p>A <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a> that contains every point to the right of the given X coordinate.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.everything_left_of" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#140-144">Source</a><h4 class="code-header">pub fn <a href="#method.everything_left_of" class="fn">everything_left_of</a>(right_x: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class="docblock"><p>A <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a> that contains every point to the left of the given X coordinate.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.everything_below" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#148-152">Source</a><h4 class="code-header">pub fn <a href="#method.everything_below" class="fn">everything_below</a>(top_y: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class="docblock"><p>A <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a> that contains every point below a certain y coordinate</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.everything_above" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#156-160">Source</a><h4 class="code-header">pub fn <a href="#method.everything_above" class="fn">everything_above</a>(bottom_y: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class="docblock"><p>A <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a> that contains every point above a certain y coordinate</p>
|
|
</div></details><section id="method.with_min_x" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#164-167">Source</a><h4 class="code-header">pub fn <a href="#method.with_min_x" class="fn">with_min_x</a>(self, min_x: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section><section id="method.with_min_y" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#171-174">Source</a><h4 class="code-header">pub fn <a href="#method.with_min_y" class="fn">with_min_y</a>(self, min_y: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section><section id="method.with_max_x" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#178-181">Source</a><h4 class="code-header">pub fn <a href="#method.with_max_x" class="fn">with_max_x</a>(self, max_x: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section><section id="method.with_max_y" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#185-188">Source</a><h4 class="code-header">pub fn <a href="#method.with_max_y" class="fn">with_max_y</a>(self, max_y: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section><details class="toggle method-toggle" open><summary><section id="method.expand" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#192-194">Source</a><h4 class="code-header">pub fn <a href="#method.expand" class="fn">expand</a>(self, amnt: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class="docblock"><p>Expand by this much in each direction, keeping the center</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.expand2" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#198-200">Source</a><h4 class="code-header">pub fn <a href="#method.expand2" class="fn">expand2</a>(self, amnt: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> Self</h4></section></summary><div class="docblock"><p>Expand by this much in each direction, keeping the center</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.scale_from_center" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#204-206">Source</a><h4 class="code-header">pub fn <a href="#method.scale_from_center" class="fn">scale_from_center</a>(self, scale_factor: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class="docblock"><p>Scale up by this factor in each direction, keeping the center</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.scale_from_center2" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#210-212">Source</a><h4 class="code-header">pub fn <a href="#method.scale_from_center2" class="fn">scale_from_center2</a>(self, scale_factor: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> Self</h4></section></summary><div class="docblock"><p>Scale up by this factor in each direction, keeping the center</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.shrink" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#216-218">Source</a><h4 class="code-header">pub fn <a href="#method.shrink" class="fn">shrink</a>(self, amnt: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class="docblock"><p>Shrink by this much in each direction, keeping the center</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.shrink2" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#222-224">Source</a><h4 class="code-header">pub fn <a href="#method.shrink2" class="fn">shrink2</a>(self, amnt: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> Self</h4></section></summary><div class="docblock"><p>Shrink by this much in each direction, keeping the center</p>
|
|
</div></details><section id="method.translate" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#228-230">Source</a><h4 class="code-header">pub fn <a href="#method.translate" class="fn">translate</a>(self, amnt: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> Self</h4></section><details class="toggle method-toggle" open><summary><section id="method.rotate_bb" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#235-245">Source</a><h4 class="code-header">pub fn <a href="#method.rotate_bb" class="fn">rotate_bb</a>(self, rot: <a class="struct" href="struct.Rot2.html" title="struct emath::Rot2">Rot2</a>) -> Self</h4></section></summary><div class="docblock"><p>Rotate the bounds (will expand the <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a>)</p>
|
|
</div></details><section id="method.intersects" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#249-254">Source</a><h4 class="code-header">pub fn <a href="#method.intersects" class="fn">intersects</a>(self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.set_width" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#257-259">Source</a><h4 class="code-header">pub fn <a href="#method.set_width" class="fn">set_width</a>(&mut self, w: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>keep min</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_height" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#262-264">Source</a><h4 class="code-header">pub fn <a href="#method.set_height" class="fn">set_height</a>(&mut self, h: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>keep min</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_center" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#267-269">Source</a><h4 class="code-header">pub fn <a href="#method.set_center" class="fn">set_center</a>(&mut self, center: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>)</h4></section></summary><div class="docblock"><p>Keep size</p>
|
|
</div></details><section id="method.contains" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#273-275">Source</a><h4 class="code-header">pub fn <a href="#method.contains" class="fn">contains</a>(&self, p: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="method.contains_rect" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#278-280">Source</a><h4 class="code-header">pub fn <a href="#method.contains_rect" class="fn">contains_rect</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#285-287">Source</a><h4 class="code-header">pub fn <a href="#method.clamp" class="fn">clamp</a>(&self, p: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section></summary><div class="docblock"><p>Return the given points clamped to be inside the rectangle
|
|
Panics if <a href="struct.Rect.html#method.is_negative" title="method emath::Rect::is_negative"><code>Self::is_negative</code></a>.</p>
|
|
</div></details><section id="method.extend_with" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#290-293">Source</a><h4 class="code-header">pub fn <a href="#method.extend_with" class="fn">extend_with</a>(&mut self, p: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.extend_with_x" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#297-300">Source</a><h4 class="code-header">pub fn <a href="#method.extend_with_x" class="fn">extend_with_x</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Expand to include the given x coordinate</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_with_y" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#304-307">Source</a><h4 class="code-header">pub fn <a href="#method.extend_with_y" class="fn">extend_with_y</a>(&mut self, y: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Expand to include the given y coordinate</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.union" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#313-318">Source</a><h4 class="code-header">pub fn <a href="#method.union" class="fn">union</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The union of two bounding rectangle, i.e. the minimum <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a>
|
|
that contains both input rectangles.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.intersect" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#323-328">Source</a><h4 class="code-header">pub fn <a href="#method.intersect" class="fn">intersect</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The intersection of two <a href="struct.Rect.html" title="struct emath::Rect"><code>Rect</code></a>, i.e. the area covered by both.</p>
|
|
</div></details><section id="method.center" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#331-336">Source</a><h4 class="code-header">pub fn <a href="#method.center" class="fn">center</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.size" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#340-342">Source</a><h4 class="code-header">pub fn <a href="#method.size" class="fn">size</a>(&self) -> <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a></h4></section></summary><div class="docblock"><p><code>rect.size() == Vec2 { x: rect.width(), y: rect.height() }</code></p>
|
|
</div></details><section id="method.width" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#345-347">Source</a><h4 class="code-header">pub fn <a href="#method.width" class="fn">width</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section><section id="method.height" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#350-352">Source</a><h4 class="code-header">pub fn <a href="#method.height" class="fn">height</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.aspect_ratio" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#359-361">Source</a><h4 class="code-header">pub fn <a href="#method.aspect_ratio" class="fn">aspect_ratio</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Width / height</p>
|
|
<ul>
|
|
<li><code>aspect_ratio < 1</code>: portrait / high</li>
|
|
<li><code>aspect_ratio = 1</code>: square</li>
|
|
<li><code>aspect_ratio > 1</code>: landscape / wide</li>
|
|
</ul>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.square_proportions" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#366-374">Source</a><h4 class="code-header">pub fn <a href="#method.square_proportions" class="fn">square_proportions</a>(&self) -> <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a></h4></section></summary><div class="docblock"><p><code>[2, 1]</code> for wide screen, and <code>[1, 2]</code> for portrait, etc.
|
|
At least one dimension = 1, the other >= 1
|
|
Returns the proportions required to letter-box a square view area.</p>
|
|
</div></details><section id="method.area" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#377-379">Source</a><h4 class="code-header">pub fn <a href="#method.area" class="fn">area</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.distance_to_pos" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#387-389">Source</a><h4 class="code-header">pub fn <a href="#method.distance_to_pos" class="fn">distance_to_pos</a>(&self, pos: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>The distance from the rect to the position.</p>
|
|
<p>The distance is zero when the position is in the interior of the rectangle.</p>
|
|
<p><a href="struct.Rect.html#method.is_negative" title="method emath::Rect::is_negative">Negative rectangles</a> always return <a href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html#associatedconstant.INFINITY" title="associated constant f32::INFINITY"><code>f32::INFINITY</code></a>.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.distance_sq_to_pos" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#397-419">Source</a><h4 class="code-header">pub fn <a href="#method.distance_sq_to_pos" class="fn">distance_sq_to_pos</a>(&self, pos: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>The distance from the rect to the position, squared.</p>
|
|
<p>The distance is zero when the position is in the interior of the rectangle.</p>
|
|
<p><a href="struct.Rect.html#method.is_negative" title="method emath::Rect::is_negative">Negative rectangles</a> always return <a href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html#associatedconstant.INFINITY" title="associated constant f32::INFINITY"><code>f32::INFINITY</code></a>.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.signed_distance_to_pos" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#434-443">Source</a><h4 class="code-header">pub fn <a href="#method.signed_distance_to_pos" class="fn">signed_distance_to_pos</a>(&self, pos: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Signed distance to the edge of the box.</p>
|
|
<p>Negative inside the box.</p>
|
|
<p><a href="struct.Rect.html#method.is_negative" title="method emath::Rect::is_negative">Negative rectangles</a> always return <a href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html#associatedconstant.INFINITY" title="associated constant f32::INFINITY"><code>f32::INFINITY</code></a>.</p>
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>rect = Rect::from_min_max(pos2(<span class="number">0.0</span>, <span class="number">0.0</span>), pos2(<span class="number">1.0</span>, <span class="number">1.0</span>));
|
|
<span class="macro">assert_eq!</span>(rect.signed_distance_to_pos(pos2(<span class="number">0.50</span>, <span class="number">0.50</span>)), -<span class="number">0.50</span>);
|
|
<span class="macro">assert_eq!</span>(rect.signed_distance_to_pos(pos2(<span class="number">0.75</span>, <span class="number">0.50</span>)), -<span class="number">0.25</span>);
|
|
<span class="macro">assert_eq!</span>(rect.signed_distance_to_pos(pos2(<span class="number">1.50</span>, <span class="number">0.50</span>)), <span class="number">0.50</span>);</code></pre></div>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.lerp_inside" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#448-453">Source</a><h4 class="code-header">pub fn <a href="#method.lerp_inside" class="fn">lerp_inside</a>(&self, t: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section></summary><div class="docblock"><p>Linearly interpolate so that <code>[0, 0]</code> is <a href="struct.Rect.html#structfield.min" title="field emath::Rect::min"><code>Self::min</code></a> and
|
|
<code>[1, 1]</code> is <a href="struct.Rect.html#structfield.max" title="field emath::Rect::max"><code>Self::max</code></a>.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.lerp_towards" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#457-462">Source</a><h4 class="code-header">pub fn <a href="#method.lerp_towards" class="fn">lerp_towards</a>(&self, other: &Self, t: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class="docblock"><p>Linearly self towards other rect.</p>
|
|
</div></details><section id="method.x_range" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#465-467">Source</a><h4 class="code-header">pub fn <a href="#method.x_range" class="fn">x_range</a>(&self) -> <a class="struct" href="struct.Rangef.html" title="struct emath::Rangef">Rangef</a></h4></section><section id="method.y_range" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#470-472">Source</a><h4 class="code-header">pub fn <a href="#method.y_range" class="fn">y_range</a>(&self) -> <a class="struct" href="struct.Rangef.html" title="struct emath::Rangef">Rangef</a></h4></section><section id="method.bottom_up_range" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#475-477">Source</a><h4 class="code-header">pub fn <a href="#method.bottom_up_range" class="fn">bottom_up_range</a>(&self) -> <a class="struct" href="struct.Rangef.html" title="struct emath::Rangef">Rangef</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.is_negative" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#481-483">Source</a><h4 class="code-header">pub fn <a href="#method.is_negative" class="fn">is_negative</a>(&self) -> <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><code>width < 0 || height < 0</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_positive" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#487-489">Source</a><h4 class="code-header">pub fn <a href="#method.is_positive" class="fn">is_positive</a>(&self) -> <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><code>width > 0 && height > 0</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_finite" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#493-495">Source</a><h4 class="code-header">pub fn <a href="#method.is_finite" class="fn">is_finite</a>(&self) -> <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>True if all members are also finite.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.any_nan" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#499-501">Source</a><h4 class="code-header">pub fn <a href="#method.any_nan" class="fn">any_nan</a>(self) -> <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>True if any member is NaN.</p>
|
|
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Rect-1" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#505-645">Source</a><a href="#impl-Rect-1" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h3></section></summary><div class="docblock"><h5 id="convenience-functions-assumes-origin-is-towards-left-top"><a class="doc-anchor" href="#convenience-functions-assumes-origin-is-towards-left-top">§</a>Convenience functions (assumes origin is towards left top):</h5></div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.left" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#508-510">Source</a><h4 class="code-header">pub fn <a href="#method.left" class="fn">left</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p><code>min.x</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.left_mut" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#514-516">Source</a><h4 class="code-header">pub fn <a href="#method.left_mut" class="fn">left_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p><code>min.x</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_left" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#520-522">Source</a><h4 class="code-header">pub fn <a href="#method.set_left" class="fn">set_left</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p><code>min.x</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.right" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#526-528">Source</a><h4 class="code-header">pub fn <a href="#method.right" class="fn">right</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p><code>max.x</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.right_mut" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#532-534">Source</a><h4 class="code-header">pub fn <a href="#method.right_mut" class="fn">right_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p><code>max.x</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_right" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#538-540">Source</a><h4 class="code-header">pub fn <a href="#method.set_right" class="fn">set_right</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p><code>max.x</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.top" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#544-546">Source</a><h4 class="code-header">pub fn <a href="#method.top" class="fn">top</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p><code>min.y</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.top_mut" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#550-552">Source</a><h4 class="code-header">pub fn <a href="#method.top_mut" class="fn">top_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p><code>min.y</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_top" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#556-558">Source</a><h4 class="code-header">pub fn <a href="#method.set_top" class="fn">set_top</a>(&mut self, y: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p><code>min.y</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.bottom" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#562-564">Source</a><h4 class="code-header">pub fn <a href="#method.bottom" class="fn">bottom</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p><code>max.y</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.bottom_mut" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#568-570">Source</a><h4 class="code-header">pub fn <a href="#method.bottom_mut" class="fn">bottom_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p><code>max.y</code></p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_bottom" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#574-576">Source</a><h4 class="code-header">pub fn <a href="#method.set_bottom" class="fn">set_bottom</a>(&mut self, y: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p><code>max.y</code></p>
|
|
</div></details><section id="method.left_top" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#580-582">Source</a><h4 class="code-header">pub fn <a href="#method.left_top" class="fn">left_top</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><section id="method.center_top" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#585-587">Source</a><h4 class="code-header">pub fn <a href="#method.center_top" class="fn">center_top</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><section id="method.right_top" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#591-593">Source</a><h4 class="code-header">pub fn <a href="#method.right_top" class="fn">right_top</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><section id="method.left_center" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#596-598">Source</a><h4 class="code-header">pub fn <a href="#method.left_center" class="fn">left_center</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><section id="method.right_center" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#601-603">Source</a><h4 class="code-header">pub fn <a href="#method.right_center" class="fn">right_center</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><section id="method.left_bottom" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#607-609">Source</a><h4 class="code-header">pub fn <a href="#method.left_bottom" class="fn">left_bottom</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><section id="method.center_bottom" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#612-614">Source</a><h4 class="code-header">pub fn <a href="#method.center_bottom" class="fn">center_bottom</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><section id="method.right_bottom" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#618-620">Source</a><h4 class="code-header">pub fn <a href="#method.right_bottom" class="fn">right_bottom</a>(&self) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.split_left_right_at_fraction" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#623-625">Source</a><h4 class="code-header">pub fn <a href="#method.split_left_right_at_fraction" class="fn">split_left_right_at_fraction</a>(&self, t: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> (Self, Self)</h4></section></summary><div class="docblock"><p>Split rectangle in left and right halves. <code>t</code> is expected to be in the (0,1) range.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.split_left_right_at_x" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#628-632">Source</a><h4 class="code-header">pub fn <a href="#method.split_left_right_at_x" class="fn">split_left_right_at_x</a>(&self, split_x: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> (Self, Self)</h4></section></summary><div class="docblock"><p>Split rectangle in left and right halves at the given <code>x</code> coordinate.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.split_top_bottom_at_fraction" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#635-637">Source</a><h4 class="code-header">pub fn <a href="#method.split_top_bottom_at_fraction" class="fn">split_top_bottom_at_fraction</a>(&self, t: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> (Self, Self)</h4></section></summary><div class="docblock"><p>Split rectangle in top and bottom halves. <code>t</code> is expected to be in the (0,1) range.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.split_top_bottom_at_y" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#640-644">Source</a><h4 class="code-header">pub fn <a href="#method.split_top_bottom_at_y" class="fn">split_top_bottom_at_y</a>(&self, split_y: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> (Self, Self)</h4></section></summary><div class="docblock"><p>Split rectangle in top and bottom halves at the given <code>y</code> coordinate.</p>
|
|
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Rect-2" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#647-701">Source</a><a href="#impl-Rect-2" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.intersects_ray" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#651-674">Source</a><h4 class="code-header">pub fn <a href="#method.intersects_ray" class="fn">intersects_ray</a>(&self, o: <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>, d: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> <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>Does this Rect intersect the given ray (where <code>d</code> is normalized)?</p>
|
|
<p>A ray that starts inside the rect will return <code>true</code>.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.intersects_ray_from_center" class="method"><a class="src rightside" href="../src/emath/rect.rs.html#679-700">Source</a><h4 class="code-header">pub fn <a href="#method.intersects_ray_from_center" class="fn">intersects_ray_from_center</a>(&self, d: <a class="struct" href="struct.Vec2.html" title="struct emath::Vec2">Vec2</a>) -> <a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a></h4></section></summary><div class="docblock"><p>Where does a ray from the center intersect the rectangle?</p>
|
|
<p><code>d</code> is the direction of the ray and assumed to be normalized.</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-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#21">Source</a><a href="#impl-Clone-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</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/emath/rect.rs.html#21">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>(&self) -> <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</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>(&mut self, source: &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-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#703-707">Source</a><a href="#impl-Debug-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</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/emath/rect.rs.html#704-706">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>(&self, f: &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><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.84.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></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-Display-for-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#709-718">Source</a><a href="#impl-Display-for-Rect" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../src/emath/rect.rs.html#710-717">Source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &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><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.84.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></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.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Div%3Cf32%3E-for-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#752-762">Source</a><a href="#impl-Div%3Cf32%3E-for-Rect" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Div.html" title="trait core::ops::arith::Div">Div</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/emath/rect.rs.html#753">Source</a><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Div.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>/</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.div" class="method trait-impl"><a class="src rightside" href="../src/emath/rect.rs.html#756-761">Source</a><a href="#method.div" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Div.html#tymethod.div" class="fn">div</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class='docblock'>Performs the <code>/</code> operation. <a href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Div.html#tymethod.div">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%5BPos2;+2%5D%3E-for-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#721-726">Source</a><a href="#impl-From%3C%5BPos2;+2%5D%3E-for-Rect" 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><[<a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">2</a>]> for <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h3></section></summary><div class="docblock"><p>from (min, max) or (left top, right bottom)</p>
|
|
</div><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/emath/rect.rs.html#723-725">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>([min, max]: [<a class="struct" href="struct.Pos2.html" title="struct emath::Pos2">Pos2</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">2</a>]) -> Self</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-Mul%3CRect%3E-for-TSTransform" class="impl"><a class="src rightside" href="../src/emath/ts_transform.rs.html#117-124">Source</a><a href="#impl-Mul%3CRect%3E-for-TSTransform" 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><<a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a>> for <a class="struct" href="struct.TSTransform.html" title="struct emath::TSTransform">TSTransform</a></h3></section></summary><div class="docblock"><p>Transforms the rectangle.</p>
|
|
</div><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/emath/ts_transform.rs.html#118">Source</a><a href="#associatedtype.Output-3" 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.Rect.html" title="struct emath::Rect">Rect</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.mul-2" class="method trait-impl"><a class="src rightside" href="../src/emath/ts_transform.rs.html#121-123">Source</a><a href="#method.mul-2" 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, rect: <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a>) -> <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Mul%3CRect%3E-for-f32" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#740-750">Source</a><a href="#impl-Mul%3CRect%3E-for-f32" 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><<a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a>> for <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/emath/rect.rs.html#741">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.Rect.html" title="struct emath::Rect">Rect</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.mul-1" class="method trait-impl"><a class="src rightside" href="../src/emath/rect.rs.html#744-749">Source</a><a href="#method.mul-1" 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, vec: <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a>) -> <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Mul%3Cf32%3E-for-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#728-738">Source</a><a href="#impl-Mul%3Cf32%3E-for-Rect" 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><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</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/emath/rect.rs.html#729">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/arith/trait.Mul.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.mul" class="method trait-impl"><a class="src rightside" href="../src/emath/rect.rs.html#732-737">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, factor: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#21">Source</a><a href="#impl-PartialEq-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</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/emath/rect.rs.html#21">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>(&self, other: &<a class="struct" href="struct.Rect.html" title="struct emath::Rect">Rect</a>) -> <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>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&Rhs</a>) -> <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-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#23">Source</a><a href="#impl-Zeroable-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</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>() -> 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-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#21">Source</a><a href="#impl-Copy-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</a></h3></section><section id="impl-Eq-for-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#21">Source</a><a href="#impl-Eq-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</a></h3></section><section id="impl-Pod-for-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#23">Source</a><a href="#impl-Pod-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</a></h3></section><section id="impl-StructuralPartialEq-for-Rect" class="impl"><a class="src rightside" href="../src/emath/rect.rs.html#21">Source</a><a href="#impl-StructuralPartialEq-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</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-Rect" class="impl"><a href="#impl-Freeze-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</a></h3></section><section id="impl-RefUnwindSafe-for-Rect" class="impl"><a href="#impl-RefUnwindSafe-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</a></h3></section><section id="impl-Send-for-Rect" class="impl"><a href="#impl-Send-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</a></h3></section><section id="impl-Sync-for-Rect" class="impl"><a href="#impl-Sync-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</a></h3></section><section id="impl-Unpin-for-Rect" class="impl"><a href="#impl-Unpin-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</a></h3></section><section id="impl-UnwindSafe-for-Rect" class="impl"><a href="#impl-UnwindSafe-for-Rect" 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.Rect.html" title="struct emath::Rect">Rect</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<T> <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>(&self) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> 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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&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<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> 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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&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<T> <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">&T</a>) -> <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>&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<T> <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>(&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<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</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="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#768">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>(t: T) -> 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<T, 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><U> 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><T>,</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) -> 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><T> 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<T> <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>(&self) -> 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>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&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-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/string.rs.html#2677">Source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where
|
|
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<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.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/string.rs.html#2683">Source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.84.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&self) -> <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'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.84.0/alloc/string/trait.ToString.html#tymethod.to_string">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<T, 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><U> 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><T>,</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) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <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><U>>::<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'>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<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> 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><T>,</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> = <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><T>>::<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) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <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><T>>::<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'>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<T> <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<T> <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> |