}</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>A trait implemented by spans within a character-based source.</p>
</div></details><h2id="required-associated-types"class="section-header">Required Associated Types<ahref="#required-associated-types"class="anchor">§</a></h2><divclass="methods"><detailsclass="toggle"open><summary><sectionid="associatedtype.SourceId"class="method"><aclass="src rightside"href="../src/ariadne/lib.rs.html#31">source</a><h4class="code-header">type <ahref="#associatedtype.SourceId"class="associatedtype">SourceId</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> + ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a></h4></section></summary><divclass="docblock"><p>The identifier used to uniquely refer to a source. In most cases, this is the fully-qualified path of the file.</p>
</div></details></div><h2id="required-methods"class="section-header">Required Methods<ahref="#required-methods"class="anchor">§</a></h2><divclass="methods"><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.source"class="method"><aclass="src rightside"href="../src/ariadne/lib.rs.html#34">source</a><h4class="code-header">fn <ahref="#tymethod.source"class="fn">source</a>(&self) ->&Self::<aclass="associatedtype"href="trait.Span.html#associatedtype.SourceId"title="type ariadne::Span::SourceId">SourceId</a></h4></section></summary><divclass="docblock"><p>Get the identifier of the source that this span refers to.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.start"class="method"><aclass="src rightside"href="../src/ariadne/lib.rs.html#39">source</a><h4class="code-header">fn <ahref="#tymethod.start"class="fn">start</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Get the start offset of this span.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.end"class="method"><aclass="src rightside"href="../src/ariadne/lib.rs.html#46">source</a><h4class="code-header">fn <ahref="#tymethod.end"class="fn">end</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Get the (exclusive) end offset of this span.</p>
<p>The end offset should <em>always</em> be greater than or equal to the start offset as given by <ahref="trait.Span.html#tymethod.start"title="method ariadne::Span::start"><code>Span::start</code></a>.</p>
<p>Offsets are zero-indexed character offsets from the beginning of the source.</p>
</div></details></div><h2id="provided-methods"class="section-header">Provided Methods<ahref="#provided-methods"class="anchor">§</a></h2><divclass="methods"><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><aclass="src rightside"href="../src/ariadne/lib.rs.html#49-51">source</a><h4class="code-header">fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Get the length of this span (difference between the start of the span and the end of the span).</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><aclass="src rightside"href="../src/ariadne/lib.rs.html#54-56">source</a><h4class="code-header">fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if this span has length zero.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.contains"class="method"><aclass="src rightside"href="../src/ariadne/lib.rs.html#59-61">source</a><h4class="code-header">fn <ahref="#method.contains"class="fn">contains</a>(&self, offset: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Determine whether the span contains the given offset.</p>