mirror of
https://github.com/edg-l/edlang.git
synced 2024-11-23 16:38:24 +00:00
131 lines
52 KiB
HTML
131 lines
52 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 trait for reading the data from a DWARF section."><title>Reader in gimli::read - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="gimli" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.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">☰</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../gimli/index.html">gimli</a><span class="version">0.28.1</span></h2></div><h2 class="location"><a href="#">Reader</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Endian">Endian</a></li><li><a href="#associatedtype.Offset">Offset</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.empty">empty</a></li><li><a href="#tymethod.endian">endian</a></li><li><a href="#tymethod.find">find</a></li><li><a href="#tymethod.len">len</a></li><li><a href="#tymethod.lookup_offset_id">lookup_offset_id</a></li><li><a href="#tymethod.offset_from">offset_from</a></li><li><a href="#tymethod.offset_id">offset_id</a></li><li><a href="#tymethod.read_slice">read_slice</a></li><li><a href="#tymethod.skip">skip</a></li><li><a href="#tymethod.split">split</a></li><li><a href="#tymethod.to_slice">to_slice</a></li><li><a href="#tymethod.to_string">to_string</a></li><li><a href="#tymethod.to_string_lossy">to_string_lossy</a></li><li><a href="#tymethod.truncate">truncate</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.read_address">read_address</a></li><li><a href="#method.read_f32">read_f32</a></li><li><a href="#method.read_f64">read_f64</a></li><li><a href="#method.read_i16">read_i16</a></li><li><a href="#method.read_i32">read_i32</a></li><li><a href="#method.read_i64">read_i64</a></li><li><a href="#method.read_i8">read_i8</a></li><li><a href="#method.read_initial_length">read_initial_length</a></li><li><a href="#method.read_length">read_length</a></li><li><a href="
|
|||
|
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../gimli/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">gimli</a>::<wbr><a href="index.html">read</a>::<wbr><a class="trait" href="#">Reader</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/gimli/read/reader.rs.html#215-502">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Reader: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> {
|
|||
|
type <a href="#associatedtype.Endian" class="associatedtype">Endian</a>: <a class="trait" href="../trait.Endianity.html" title="trait gimli::Endianity">Endianity</a>;
|
|||
|
type <a href="#associatedtype.Offset" class="associatedtype">Offset</a>: <a class="trait" href="trait.ReaderOffset.html" title="trait gimli::read::ReaderOffset">ReaderOffset</a>;
|
|||
|
|
|||
|
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 39 methods</span></summary> // Required methods
|
|||
|
fn <a href="#tymethod.endian" class="fn">endian</a>(&self) -> Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Endian" title="type gimli::read::Reader::Endian">Endian</a>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.len" class="fn">len</a>(&self) -> Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.empty" class="fn">empty</a>(&mut self);
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.truncate" class="fn">truncate</a>(&mut self, len: Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.unit.html">()</a>>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.offset_from" class="fn">offset_from</a>(&self, base: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.reference.html">&Self</a>) -> Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.offset_id" class="fn">offset_id</a>(&self) -> <a class="struct" href="struct.ReaderOffsetId.html" title="struct gimli::read::ReaderOffsetId">ReaderOffsetId</a>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.lookup_offset_id" class="fn">lookup_offset_id</a>(&self, id: <a class="struct" href="struct.ReaderOffsetId.html" title="struct gimli::read::ReaderOffsetId">ReaderOffsetId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.find" class="fn">find</a>(&self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.skip" class="fn">skip</a>(&mut self, len: Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.unit.html">()</a>>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.split" class="fn">split</a>(&mut self, len: Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.to_slice" class="fn">to_slice</a>(&self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.76.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, [<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>]>>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.76.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.str.html">str</a>>>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.to_string_lossy" class="fn">to_string_lossy</a>(&self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.76.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.str.html">str</a>>>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.read_slice" class="fn">read_slice</a>(&mut self, buf: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>]) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.unit.html">()</a>>;
|
|||
|
|
|||
|
// Provided methods
|
|||
|
fn <a href="#method.read_u8_array" class="fn">read_u8_array</a><A>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><A>
|
|||
|
<span class="where">where A: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>]></span> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.bool.html">bool</a> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_u8" class="fn">read_u8</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_i8" class="fn">read_i8</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i8.html">i8</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_u16" class="fn">read_u16</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_i16" class="fn">read_i16</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i16.html">i16</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_u32" class="fn">read_u32</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_i32" class="fn">read_i32</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i32.html">i32</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_u64" class="fn">read_u64</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_i64" class="fn">read_i64</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i64.html">i64</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_f32" class="fn">read_f32</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.f32.html">f32</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_f64" class="fn">read_f64</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.f64.html">f64</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_uint" class="fn">read_uint</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.usize.html">usize</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_null_terminated_slice" class="fn">read_null_terminated_slice</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.skip_leb128" class="fn">skip_leb128</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.unit.html">()</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_uleb128" class="fn">read_uleb128</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_uleb128_u32" class="fn">read_uleb128_u32</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_uleb128_u16" class="fn">read_uleb128_u16</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_sleb128" class="fn">read_sleb128</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i64.html">i64</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_initial_length" class="fn">read_initial_length</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><(Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>, <a class="enum" href="../enum.Format.html" title="enum gimli::Format">Format</a>)> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_address" class="fn">read_address</a>(&mut self, address_size: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_word" class="fn">read_word</a>(&mut self, format: <a class="enum" href="../enum.Format.html" title="enum gimli::Format">Format</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_length" class="fn">read_length</a>(&mut self, format: <a class="enum" href="../enum.Format.html" title="enum gimli::Format">Format</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_offset" class="fn">read_offset</a>(&mut self, format: <a class="enum" href="../enum.Format.html" title="enum gimli::Format">Format</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.read_sized_offset" class="fn">read_sized_offset</a>(&mut self, size: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>> { ... }
|
|||
|
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait for reading the data from a DWARF section.</p>
|
|||
|
<p>All read operations advance the section offset of the reader
|
|||
|
unless specified otherwise.</p>
|
|||
|
<h3 id="choosing-a-reader-implementation"><a href="#choosing-a-reader-implementation">Choosing a <code>Reader</code> Implementation</a></h3>
|
|||
|
<p><code>gimli</code> comes with a few different <code>Reader</code> implementations and lets you
|
|||
|
choose the one that is right for your use case. A <code>Reader</code> is essentially a
|
|||
|
view into the raw bytes that make up some DWARF, but this view might borrow
|
|||
|
the underlying data or use reference counting ownership, and it might be
|
|||
|
thread safe or not.</p>
|
|||
|
<div><table><thead><tr><th style="text-align: left">Implementation</th><th style="text-align: left">Ownership</th><th style="text-align: left">Thread Safe</th><th style="text-align: left">Notes</th></tr></thead><tbody>
|
|||
|
<tr><td style="text-align: left"><a href="./struct.EndianSlice.html"><code>EndianSlice</code></a></td><td style="text-align: left">Borrowed</td><td style="text-align: left">Yes</td><td style="text-align: left">Fastest, but requires that all of your code work with borrows.</td></tr>
|
|||
|
<tr><td style="text-align: left"><a href="./struct.EndianRcSlice.html"><code>EndianRcSlice</code></a></td><td style="text-align: left">Reference counted</td><td style="text-align: left">No</td><td style="text-align: left">Shared ownership via reference counting, which alleviates the borrow restrictions of <code>EndianSlice</code> but imposes reference counting increments and decrements. Cannot be sent across threads, because the reference count is not atomic.</td></tr>
|
|||
|
<tr><td style="text-align: left"><a href="./struct.EndianArcSlice.html"><code>EndianArcSlice</code></a></td><td style="text-align: left">Reference counted</td><td style="text-align: left">Yes</td><td style="text-align: left">The same as <code>EndianRcSlice</code>, but uses atomic reference counting, and therefore reference counting operations are slower but <code>EndianArcSlice</code>s may be sent across threads.</td></tr>
|
|||
|
<tr><td style="text-align: left"><a href="./struct.EndianReader.html"><code>EndianReader<T></code></a></td><td style="text-align: left">Same as <code>T</code></td><td style="text-align: left">Same as <code>T</code></td><td style="text-align: left">Escape hatch for easily defining your own type of <code>Reader</code>.</td></tr>
|
|||
|
</tbody></table>
|
|||
|
</div></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"><details class="toggle" open><summary><section id="associatedtype.Endian" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#217">source</a><h4 class="code-header">type <a href="#associatedtype.Endian" class="associatedtype">Endian</a>: <a class="trait" href="../trait.Endianity.html" title="trait gimli::Endianity">Endianity</a></h4></section></summary><div class="docblock"><p>The endianity of bytes that are read.</p>
|
|||
|
</div></details><details class="toggle" open><summary><section id="associatedtype.Offset" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#220">source</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a>: <a class="trait" href="trait.ReaderOffset.html" title="trait gimli::read::ReaderOffset">ReaderOffset</a></h4></section></summary><div class="docblock"><p>The type used for offsets and lengths.</p>
|
|||
|
</div></details></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.endian" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#223">source</a><h4 class="code-header">fn <a href="#tymethod.endian" class="fn">endian</a>(&self) -> Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Endian" title="type gimli::read::Reader::Endian">Endian</a></h4></section></summary><div class="docblock"><p>Return the endianity of bytes that are read.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.len" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#226">source</a><h4 class="code-header">fn <a href="#tymethod.len" class="fn">len</a>(&self) -> Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a></h4></section></summary><div class="docblock"><p>Return the number of bytes remaining.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.empty" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#229">source</a><h4 class="code-header">fn <a href="#tymethod.empty" class="fn">empty</a>(&mut self)</h4></section></summary><div class="docblock"><p>Set the number of bytes remaining to zero.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.truncate" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#232">source</a><h4 class="code-header">fn <a href="#tymethod.truncate" class="fn">truncate</a>(&mut self, len: Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.unit.html">()</a>></h4></section></summary><div class="docblock"><p>Set the number of bytes remaining to the specified length.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_from" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#239">source</a><h4 class="code-header">fn <a href="#tymethod.offset_from" class="fn">offset_from</a>(&self, base: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.reference.html">&Self</a>) -> Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a></h4></section></summary><div class="docblock"><p>Return the offset of this reader’s data relative to the start of
|
|||
|
the given base reader’s data.</p>
|
|||
|
<p>May panic if this reader’s data is not contained within the given
|
|||
|
base reader’s data.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.offset_id" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#242">source</a><h4 class="code-header">fn <a href="#tymethod.offset_id" class="fn">offset_id</a>(&self) -> <a class="struct" href="struct.ReaderOffsetId.html" title="struct gimli::read::ReaderOffsetId">ReaderOffsetId</a></h4></section></summary><div class="docblock"><p>Return an identifier for the current reader offset.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.lookup_offset_id" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#246">source</a><h4 class="code-header">fn <a href="#tymethod.lookup_offset_id" class="fn">lookup_offset_id</a>(&self, id: <a class="struct" href="struct.ReaderOffsetId.html" title="struct gimli::read::ReaderOffsetId">ReaderOffsetId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>></h4></section></summary><div class="docblock"><p>Return the offset corresponding to the given <code>id</code> if
|
|||
|
it is associated with this reader.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.find" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#250">source</a><h4 class="code-header">fn <a href="#tymethod.find" class="fn">find</a>(&self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>></h4></section></summary><div class="docblock"><p>Find the index of the first occurrence of the given byte.
|
|||
|
The offset of the reader is not changed.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.skip" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#253">source</a><h4 class="code-header">fn <a href="#tymethod.skip" class="fn">skip</a>(&mut self, len: Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.unit.html">()</a>></h4></section></summary><div class="docblock"><p>Discard the specified number of bytes.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.split" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#259">source</a><h4 class="code-header">fn <a href="#tymethod.split" class="fn">split</a>(&mut self, len: Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self></h4></section></summary><div class="docblock"><p>Split a reader in two.</p>
|
|||
|
<p>A new reader is returned that can be used to read the next
|
|||
|
<code>len</code> bytes, and <code>self</code> is advanced so that it reads the remainder.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.to_slice" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#277">source</a><h4 class="code-header">fn <a href="#tymethod.to_slice" class="fn">to_slice</a>(&self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.76.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, [<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>]>></h4></section></summary><div class="docblock"><p>Return all remaining data as a clone-on-write slice.</p>
|
|||
|
<p>The slice will be borrowed where possible, but some readers may
|
|||
|
always return an owned vector.</p>
|
|||
|
<p>Does not advance the reader.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.to_string" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#288">source</a><h4 class="code-header">fn <a href="#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.76.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.str.html">str</a>>></h4></section></summary><div class="docblock"><p>Convert all remaining data to a clone-on-write string.</p>
|
|||
|
<p>The string will be borrowed where possible, but some readers may
|
|||
|
always return an owned string.</p>
|
|||
|
<p>Does not advance the reader.</p>
|
|||
|
<p>Returns an error if the data contains invalid characters.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.to_string_lossy" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#297">source</a><h4 class="code-header">fn <a href="#tymethod.to_string_lossy" class="fn">to_string_lossy</a>(&self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.76.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.str.html">str</a>>></h4></section></summary><div class="docblock"><p>Convert all remaining data to a clone-on-write string, including invalid characters.</p>
|
|||
|
<p>The string will be borrowed where possible, but some readers may
|
|||
|
always return an owned string.</p>
|
|||
|
<p>Does not advance the reader.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.read_slice" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#300">source</a><h4 class="code-header">fn <a href="#tymethod.read_slice" class="fn">read_slice</a>(&mut self, buf: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>]) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.unit.html">()</a>></h4></section></summary><div class="docblock"><p>Read exactly <code>buf.len()</code> bytes into <code>buf</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.read_u8_array" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#304-311">source</a><h4 class="code-header">fn <a href="#method.read_u8_array" class="fn">read_u8_array</a><A>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><A><div class="where">where
|
|||
|
A: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Read a u8 array.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#315-317">source</a><h4 class="code-header">fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Return true if the number of bytes remaining is zero.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_u8" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#321-324">source</a><h4 class="code-header">fn <a href="#method.read_u8" class="fn">read_u8</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>></h4></section></summary><div class="docblock"><p>Read a u8.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_i8" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#328-331">source</a><h4 class="code-header">fn <a href="#method.read_i8" class="fn">read_i8</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i8.html">i8</a>></h4></section></summary><div class="docblock"><p>Read an i8.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_u16" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#335-338">source</a><h4 class="code-header">fn <a href="#method.read_u16" class="fn">read_u16</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>></h4></section></summary><div class="docblock"><p>Read a u16.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_i16" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#342-345">source</a><h4 class="code-header">fn <a href="#method.read_i16" class="fn">read_i16</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i16.html">i16</a>></h4></section></summary><div class="docblock"><p>Read an i16.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_u32" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#349-352">source</a><h4 class="code-header">fn <a href="#method.read_u32" class="fn">read_u32</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>></h4></section></summary><div class="docblock"><p>Read a u32.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_i32" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#356-359">source</a><h4 class="code-header">fn <a href="#method.read_i32" class="fn">read_i32</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i32.html">i32</a>></h4></section></summary><div class="docblock"><p>Read an i32.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_u64" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#363-366">source</a><h4 class="code-header">fn <a href="#method.read_u64" class="fn">read_u64</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>></h4></section></summary><div class="docblock"><p>Read a u64.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_i64" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#370-373">source</a><h4 class="code-header">fn <a href="#method.read_i64" class="fn">read_i64</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i64.html">i64</a>></h4></section></summary><div class="docblock"><p>Read an i64.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_f32" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#377-380">source</a><h4 class="code-header">fn <a href="#method.read_f32" class="fn">read_f32</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.f32.html">f32</a>></h4></section></summary><div class="docblock"><p>Read a f32.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_f64" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#384-387">source</a><h4 class="code-header">fn <a href="#method.read_f64" class="fn">read_f64</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.f64.html">f64</a>></h4></section></summary><div class="docblock"><p>Read a f64.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_uint" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#395-399">source</a><h4 class="code-header">fn <a href="#method.read_uint" class="fn">read_uint</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.usize.html">usize</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>></h4></section></summary><div class="docblock"><p>Read an unsigned n-bytes integer u64.</p>
|
|||
|
<h5 id="panics"><a href="#panics">Panics</a></h5>
|
|||
|
<p>Panics when nbytes < 1 or nbytes > 8</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_null_terminated_slice" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#402-407">source</a><h4 class="code-header">fn <a href="#method.read_null_terminated_slice" class="fn">read_null_terminated_slice</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self></h4></section></summary><div class="docblock"><p>Read a null-terminated slice, and return it (excluding the null).</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.skip_leb128" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#410-412">source</a><h4 class="code-header">fn <a href="#method.skip_leb128" class="fn">skip_leb128</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.unit.html">()</a>></h4></section></summary><div class="docblock"><p>Skip a LEB128 encoded integer.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_uleb128" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#415-417">source</a><h4 class="code-header">fn <a href="#method.read_uleb128" class="fn">read_uleb128</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>></h4></section></summary><div class="docblock"><p>Read an unsigned LEB128 encoded integer.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_uleb128_u32" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#420-424">source</a><h4 class="code-header">fn <a href="#method.read_uleb128_u32" class="fn">read_uleb128_u32</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>></h4></section></summary><div class="docblock"><p>Read an unsigned LEB128 encoded u32.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_uleb128_u16" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#427-429">source</a><h4 class="code-header">fn <a href="#method.read_uleb128_u16" class="fn">read_uleb128_u16</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>></h4></section></summary><div class="docblock"><p>Read an unsigned LEB128 encoded u16.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_sleb128" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#432-434">source</a><h4 class="code-header">fn <a href="#method.read_sleb128" class="fn">read_sleb128</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.i64.html">i64</a>></h4></section></summary><div class="docblock"><p>Read a signed LEB128 encoded integer.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_initial_length" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#440-453">source</a><h4 class="code-header">fn <a href="#method.read_initial_length" class="fn">read_initial_length</a>(&mut self) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><(Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>, <a class="enum" href="../enum.Format.html" title="enum gimli::Format">Format</a>)></h4></section></summary><div class="docblock"><p>Read an initial length field.</p>
|
|||
|
<p>This field is encoded as either a 32-bit length or
|
|||
|
a 64-bit length, and the returned <code>Format</code> indicates which.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_address" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#456-464">source</a><h4 class="code-header">fn <a href="#method.read_address" class="fn">read_address</a>(&mut self, address_size: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>></h4></section></summary><div class="docblock"><p>Read an address-sized integer, and return it as a <code>u64</code>.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_word" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#470-475">source</a><h4 class="code-header">fn <a href="#method.read_word" class="fn">read_word</a>(&mut self, format: <a class="enum" href="../enum.Format.html" title="enum gimli::Format">Format</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>></h4></section></summary><div class="docblock"><p>Parse a word-sized integer according to the DWARF format.</p>
|
|||
|
<p>These are always used to encode section offsets or lengths,
|
|||
|
and so have a type of <code>Self::Offset</code>.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_length" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#479-481">source</a><h4 class="code-header">fn <a href="#method.read_length" class="fn">read_length</a>(&mut self, format: <a class="enum" href="../enum.Format.html" title="enum gimli::Format">Format</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>></h4></section></summary><div class="docblock"><p>Parse a word-sized section length according to the DWARF format.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_offset" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#485-487">source</a><h4 class="code-header">fn <a href="#method.read_offset" class="fn">read_offset</a>(&mut self, format: <a class="enum" href="../enum.Format.html" title="enum gimli::Format">Format</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>></h4></section></summary><div class="docblock"><p>Parse a word-sized section offset according to the DWARF format.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_sized_offset" class="method"><a class="src rightside" href="../../src/gimli/read/reader.rs.html#492-501">source</a><h4 class="code-header">fn <a href="#method.read_sized_offset" class="fn">read_sized_offset</a>(&mut self, size: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>) -> <a class="type" href="type.Result.html" title="type gimli::read::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Offset" title="type gimli::read::Reader::Offset">Offset</a>></h4></section></summary><div class="docblock"><p>Parse a section offset of the given size.</p>
|
|||
|
<p>This is used for <code>DW_FORM_ref_addr</code> values in DWARF version 2.</p>
|
|||
|
</div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.76.0/reference/items/traits.html#object-safety">object safe</a>.</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-Reader-for-EndianSlice%3C'input,+Endian%3E" class="impl"><a class="src rightside" href="../../src/gimli/read/endian_slice.rs.html#219-332">source</a><a href="#impl-Reader-for-EndianSlice%3C'input,+Endian%3E" class="anchor">§</a><h3 class="code-header">impl<'input, Endian> <a class="trait" href="trait.Reader.html" title="trait gimli::read::Reader">Reader</a> for <a class="struct" href="struct.EndianSlice.html" title="struct gimli::read::EndianSlice">EndianSlice</a><'input, Endian><div class="where">where
|
|||
|
Endian: <a class="trait" href="../trait.Endianity.html" title="trait gimli::Endianity">Endianity</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Endian-1" class="associatedtype trait-impl"><a href="#associatedtype.Endian-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Endian" class="associatedtype">Endian</a> = Endian</h4></section><section id="associatedtype.Offset-1" class="associatedtype trait-impl"><a href="#associatedtype.Offset-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Offset" class="associatedtype">Offset</a> = <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.usize.html">usize</a></h4></section></div></details></div><script src="../../trait.impl/gimli/read/reader/trait.Reader.js" async></script></section></div></main></body></html>
|