libcosmic/cosmic/widget/canvas/path/lyon_path/geom/trait.Segment.html
2026-04-18 20:11:25 +00:00

54 lines
No EOL
28 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

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

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Common APIs to segment types."><title>Segment in cosmic::widget::canvas::path::lyon_path::geom - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../" data-static-root-path="../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../static.files/noscript-32bb7600.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 trait"><!--[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="../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Segment</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Scalar" title="Scalar">Scalar</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.after_split" title="after_split">after_split</a></li><li><a href="#tymethod.approximate_length" title="approximate_length">approximate_length</a></li><li><a href="#tymethod.before_split" title="before_split">before_split</a></li><li><a href="#tymethod.derivative" title="derivative">derivative</a></li><li><a href="#tymethod.flip" title="flip">flip</a></li><li><a href="#tymethod.for_each_flattened_with_t" title="for_each_flattened_with_t">for_each_flattened_with_t</a></li><li><a href="#tymethod.from" title="from">from</a></li><li><a href="#tymethod.sample" title="sample">sample</a></li><li><a href="#tymethod.split" title="split">split</a></li><li><a href="#tymethod.split_range" title="split_range">split_range</a></li><li><a href="#tymethod.to" title="to">to</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.dx" title="dx">dx</a></li><li><a href="#method.dy" title="dy">dy</a></li><li><a href="#method.x" title="x">x</a></li><li><a href="#method.y" title="y">y</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In cosmic::<wbr>widget::<wbr>canvas::<wbr>path::<wbr>lyon_<wbr>path::<wbr>geom</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../index.html">cosmic</a>::<wbr><a href="../../../../index.html">widget</a>::<wbr><a href="../../../index.html">canvas</a>::<wbr><a href="../../index.html">path</a>::<wbr><a href="../index.html">lyon_path</a>::<wbr><a href="index.html">geom</a></div><h1>Trait <span class="trait">Segment</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait Segment: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> {
type <a href="#associatedtype.Scalar" class="associatedtype">Scalar</a>: <a class="trait" href="trait.Scalar.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Scalar">Scalar</a>;
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 15 methods</span></summary> // Required methods
fn <a href="#tymethod.from" class="fn">from</a>(&amp;self) -&gt; <a class="struct" href="euclid/struct.Point2D.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::Point2D">Point2D</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>, <a class="struct" href="euclid/struct.UnknownUnit.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::UnknownUnit">UnknownUnit</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.to" class="fn">to</a>(&amp;self) -&gt; <a class="struct" href="euclid/struct.Point2D.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::Point2D">Point2D</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>, <a class="struct" href="euclid/struct.UnknownUnit.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::UnknownUnit">UnknownUnit</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.sample" class="fn">sample</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; <a class="struct" href="euclid/struct.Point2D.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::Point2D">Point2D</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>, <a class="struct" href="euclid/struct.UnknownUnit.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::UnknownUnit">UnknownUnit</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.derivative" class="fn">derivative</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; <a class="struct" href="euclid/struct.Vector2D.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::Vector2D">Vector2D</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>, <a class="struct" href="euclid/struct.UnknownUnit.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::UnknownUnit">UnknownUnit</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.split" class="fn">split</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; (Self, Self);
<span class="item-spacer"></span> fn <a href="#tymethod.before_split" class="fn">before_split</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.after_split" class="fn">after_split</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.split_range" class="fn">split_range</a>(&amp;self, t_range: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>&gt;) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.flip" class="fn">flip</a>(&amp;self) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.approximate_length" class="fn">approximate_length</a>(&amp;self, tolerance: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.for_each_flattened_with_t" class="fn">for_each_flattened_with_t</a>(
&amp;self,
tolerance: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>,
callback: &amp;mut dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;<a class="struct" href="struct.LineSegment.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::LineSegment">LineSegment</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>&gt;),
);
// Provided methods
fn <a href="#method.x" class="fn">x</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.y" class="fn">y</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.dx" class="fn">dx</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.dy" class="fn">dy</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a> { ... }
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Common APIs to segment types.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.Scalar" class="method"><h4 class="code-header">type <a href="#associatedtype.Scalar" class="associatedtype">Scalar</a>: <a class="trait" href="trait.Scalar.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Scalar">Scalar</a></h4></section></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.from" class="method"><h4 class="code-header">fn <a href="#tymethod.from" class="fn">from</a>(&amp;self) -&gt; <a class="struct" href="euclid/struct.Point2D.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::Point2D">Point2D</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>, <a class="struct" href="euclid/struct.UnknownUnit.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::UnknownUnit">UnknownUnit</a>&gt;</h4></section></summary><div class="docblock"><p>Start of the curve.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.to" class="method"><h4 class="code-header">fn <a href="#tymethod.to" class="fn">to</a>(&amp;self) -&gt; <a class="struct" href="euclid/struct.Point2D.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::Point2D">Point2D</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>, <a class="struct" href="euclid/struct.UnknownUnit.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::UnknownUnit">UnknownUnit</a>&gt;</h4></section></summary><div class="docblock"><p>End of the curve.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.sample" class="method"><h4 class="code-header">fn <a href="#tymethod.sample" class="fn">sample</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; <a class="struct" href="euclid/struct.Point2D.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::Point2D">Point2D</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>, <a class="struct" href="euclid/struct.UnknownUnit.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::UnknownUnit">UnknownUnit</a>&gt;</h4></section></summary><div class="docblock"><p>Sample the curve at t (expecting t between 0 and 1).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.derivative" class="method"><h4 class="code-header">fn <a href="#tymethod.derivative" class="fn">derivative</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; <a class="struct" href="euclid/struct.Vector2D.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::Vector2D">Vector2D</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>, <a class="struct" href="euclid/struct.UnknownUnit.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::euclid::UnknownUnit">UnknownUnit</a>&gt;</h4></section></summary><div class="docblock"><p>Sample the derivative at t (expecting t between 0 and 1).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.split" class="method"><h4 class="code-header">fn <a href="#tymethod.split" class="fn">split</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; (Self, Self)</h4></section></summary><div class="docblock"><p>Split this curve into two sub-curves.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.before_split" class="method"><h4 class="code-header">fn <a href="#tymethod.before_split" class="fn">before_split</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Return the curve before the split point.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.after_split" class="method"><h4 class="code-header">fn <a href="#tymethod.after_split" class="fn">after_split</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Return the curve after the split point.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.split_range" class="method"><h4 class="code-header">fn <a href="#tymethod.split_range" class="fn">split_range</a>(&amp;self, t_range: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>&gt;) -&gt; Self</h4></section></summary><div class="docblock"><p>Return the curve inside a given range of t.</p>
<p>This is equivalent splitting at the ranges end points.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.flip" class="method"><h4 class="code-header">fn <a href="#tymethod.flip" class="fn">flip</a>(&amp;self) -&gt; Self</h4></section></summary><div class="docblock"><p>Swap the direction of the segment.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.approximate_length" class="method"><h4 class="code-header">fn <a href="#tymethod.approximate_length" class="fn">approximate_length</a>(&amp;self, tolerance: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a></h4></section></summary><div class="docblock"><p>Compute the length of the segment using a flattened approximation.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.for_each_flattened_with_t" class="method"><h4 class="code-header">fn <a href="#tymethod.for_each_flattened_with_t" class="fn">for_each_flattened_with_t</a>(
&amp;self,
tolerance: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>,
callback: &amp;mut dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;<a class="struct" href="struct.LineSegment.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::LineSegment">LineSegment</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a>&lt;Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>&gt;),
)</h4></section></summary><div class="docblock"><p>Approximates the curve with sequence of line segments.</p>
<p>The <code>tolerance</code> parameter defines the maximum distance between the curve and
its approximation.</p>
<p>The parameter <code>t</code> at the final segment is guaranteed to be equal to <code>1.0</code>.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.x" class="method"><h4 class="code-header">fn <a href="#method.x" class="fn">x</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a></h4></section></summary><div class="docblock"><p>Sample x at t (expecting t between 0 and 1).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.y" class="method"><h4 class="code-header">fn <a href="#method.y" class="fn">y</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a></h4></section></summary><div class="docblock"><p>Sample y at t (expecting t between 0 and 1).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dx" class="method"><h4 class="code-header">fn <a href="#method.dx" class="fn">dx</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a></h4></section></summary><div class="docblock"><p>Sample x derivative at t (expecting t between 0 and 1).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dy" class="method"><h4 class="code-header">fn <a href="#method.dy" class="fn">dy</a>(&amp;self, t: Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a>) -&gt; Self::<a class="associatedtype" href="trait.Segment.html#associatedtype.Scalar" title="type cosmic::widget::canvas::path::lyon_path::geom::Segment::Scalar">Scalar</a></h4></section></summary><div class="docblock"><p>Sample y derivative at t (expecting t between 0 and 1).</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-Segment-for-Arc%3CS%3E" class="impl"><a href="#impl-Segment-for-Arc%3CS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S&gt; <a class="trait" href="trait.Segment.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Segment">Segment</a> for <a class="struct" href="struct.Arc.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::Arc">Arc</a>&lt;S&gt;<div class="where">where
S: <a class="trait" href="trait.Scalar.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Scalar">Scalar</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Scalar-1" class="associatedtype trait-impl"><a href="#associatedtype.Scalar-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Scalar" class="associatedtype">Scalar</a> = S</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Segment-for-CubicBezierSegment%3CS%3E" class="impl"><a href="#impl-Segment-for-CubicBezierSegment%3CS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S&gt; <a class="trait" href="trait.Segment.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Segment">Segment</a> for <a class="struct" href="struct.CubicBezierSegment.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::CubicBezierSegment">CubicBezierSegment</a>&lt;S&gt;<div class="where">where
S: <a class="trait" href="trait.Scalar.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Scalar">Scalar</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Scalar-2" class="associatedtype trait-impl"><a href="#associatedtype.Scalar-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Scalar" class="associatedtype">Scalar</a> = S</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Segment-for-LineSegment%3CS%3E" class="impl"><a href="#impl-Segment-for-LineSegment%3CS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S&gt; <a class="trait" href="trait.Segment.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Segment">Segment</a> for <a class="struct" href="struct.LineSegment.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::LineSegment">LineSegment</a>&lt;S&gt;<div class="where">where
S: <a class="trait" href="trait.Scalar.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Scalar">Scalar</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Scalar-3" class="associatedtype trait-impl"><a href="#associatedtype.Scalar-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Scalar" class="associatedtype">Scalar</a> = S</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Segment-for-QuadraticBezierSegment%3CS%3E" class="impl"><a href="#impl-Segment-for-QuadraticBezierSegment%3CS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S&gt; <a class="trait" href="trait.Segment.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Segment">Segment</a> for <a class="struct" href="struct.QuadraticBezierSegment.html" title="struct cosmic::widget::canvas::path::lyon_path::geom::QuadraticBezierSegment">QuadraticBezierSegment</a>&lt;S&gt;<div class="where">where
S: <a class="trait" href="trait.Scalar.html" title="trait cosmic::widget::canvas::path::lyon_path::geom::Scalar">Scalar</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Scalar-4" class="associatedtype trait-impl"><a href="#associatedtype.Scalar-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Scalar" class="associatedtype">Scalar</a> = S</h4></section></div></details></div><script src="../../../../../../trait.impl/lyon_geom/segment/trait.Segment.js" data-ignore-extern-crates="lyon_geom" async></script></section></div></main></body></html>