image2aa 0.1.4

Convert image to ASCII Art.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
<!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="Extends `Read` with methods for reading numbers. (For `std::io`.)"><meta name="keywords" content="rust, rustlang, rust-lang, ReadBytesExt"><title>ReadBytesExt in byteorder - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css"  id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../byteorder/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait ReadBytesExt</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><div class="sidebar-links"><a href="#method.read_f32">read_f32</a><a href="#method.read_f32_into">read_f32_into</a><a href="#method.read_f32_into_unchecked">read_f32_into_unchecked</a><a href="#method.read_f64">read_f64</a><a href="#method.read_f64_into">read_f64_into</a><a href="#method.read_f64_into_unchecked">read_f64_into_unchecked</a><a href="#method.read_i128">read_i128</a><a href="#method.read_i128_into">read_i128_into</a><a href="#method.read_i16">read_i16</a><a href="#method.read_i16_into">read_i16_into</a><a href="#method.read_i24">read_i24</a><a href="#method.read_i32">read_i32</a><a href="#method.read_i32_into">read_i32_into</a><a href="#method.read_i48">read_i48</a><a href="#method.read_i64">read_i64</a><a href="#method.read_i64_into">read_i64_into</a><a href="#method.read_i8">read_i8</a><a href="#method.read_i8_into">read_i8_into</a><a href="#method.read_int">read_int</a><a href="#method.read_int128">read_int128</a><a href="#method.read_u128">read_u128</a><a href="#method.read_u128_into">read_u128_into</a><a href="#method.read_u16">read_u16</a><a href="#method.read_u16_into">read_u16_into</a><a href="#method.read_u24">read_u24</a><a href="#method.read_u32">read_u32</a><a href="#method.read_u32_into">read_u32_into</a><a href="#method.read_u48">read_u48</a><a href="#method.read_u64">read_u64</a><a href="#method.read_u64_into">read_u64_into</a><a href="#method.read_u8">read_u8</a><a href="#method.read_uint">read_uint</a><a href="#method.read_uint128">read_uint128</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="index.html">byteorder</a></h2><div id="sidebar-vars" data-name="ReadBytesExt" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">byteorder</a>::<wbr><a class="trait" href="#">ReadBytesExt</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/byteorder/io.rs.html#30-1045" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait ReadBytesExt: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/io/trait.Read.html" title="trait std::io::Read">Read</a> {
<details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show methods</span></summary>    fn <a href="#method.read_u8" class="fnname">read_u8</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u8.html">u8</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i8" class="fnname">read_i8</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i8.html">i8</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u16" class="fnname">read_u16</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u16.html">u16</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i16" class="fnname">read_i16</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i16.html">i16</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u24" class="fnname">read_u24</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u32.html">u32</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i24" class="fnname">read_i24</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u32" class="fnname">read_u32</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u32.html">u32</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i32" class="fnname">read_i32</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u48" class="fnname">read_u48</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u64.html">u64</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i48" class="fnname">read_i48</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u64" class="fnname">read_u64</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u64.html">u64</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i64" class="fnname">read_i64</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u128" class="fnname">read_u128</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u128.html">u128</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i128" class="fnname">read_i128</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i128.html">i128</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_uint" class="fnname">read_uint</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u64.html">u64</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_int" class="fnname">read_int</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_uint128" class="fnname">read_uint128</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u128.html">u128</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_int128" class="fnname">read_int128</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i128.html">i128</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_f32" class="fnname">read_f32</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_f64" class="fnname">read_f64</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u16_into" class="fnname">read_u16_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u16.html">u16</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u32_into" class="fnname">read_u32_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u64_into" class="fnname">read_u64_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_u128_into" class="fnname">read_u128_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u128.html">u128</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i8_into" class="fnname">read_i8_into</a>(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i8.html">i8</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i16_into" class="fnname">read_i16_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i16.html">i16</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i32_into" class="fnname">read_i32_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i64_into" class="fnname">read_i64_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_i128_into" class="fnname">read_i128_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i128.html">i128</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_f32_into" class="fnname">read_f32_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_f32_into_unchecked" class="fnname">read_f32_into_unchecked</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_f64_into" class="fnname">read_f64_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
<div class="item-spacer"></div>    fn <a href="#method.read_f64_into_unchecked" class="fnname">read_f64_into_unchecked</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt; { ... }
</details>}</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extends <a href="https://doc.rust-lang.org/std/io/trait.Read.html"><code>Read</code></a> with methods for reading numbers. (For <code>std::io</code>.)</p>
<p>Most of the methods defined here have an unconstrained type parameter that
must be explicitly instantiated. Typically, it is instantiated with either
the <a href="enum.BigEndian.html"><code>BigEndian</code></a> or <a href="enum.LittleEndian.html"><code>LittleEndian</code></a> types defined in this crate.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<p>Read unsigned 16 bit big-endian integers from a <a href="https://doc.rust-lang.org/std/io/trait.Read.html"><code>Read</code></a>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">2</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">0</span>]);
<span class="macro">assert_eq!</span>(<span class="number">517</span>, <span class="ident">rdr</span>.<span class="ident">read_u16</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());
<span class="macro">assert_eq!</span>(<span class="number">768</span>, <span class="ident">rdr</span>.<span class="ident">read_u16</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.read_u8" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u8" class="fnname">read_u8</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u8.html">u8</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#55-59" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned 8 bit integer from the underlying reader.</p>
<p>Note that since this reads a single byte, no byte order conversions
are used. It is included for completeness.</p>
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
<p>Read unsigned 8 bit integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder::ReadBytesExt</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">2</span>, <span class="number">5</span>]);
<span class="macro">assert_eq!</span>(<span class="number">2</span>, <span class="ident">rdr</span>.<span class="ident">read_u8</span>().<span class="ident">unwrap</span>());
<span class="macro">assert_eq!</span>(<span class="number">5</span>, <span class="ident">rdr</span>.<span class="ident">read_u8</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i8" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i8" class="fnname">read_i8</a>(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i8.html">i8</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#85-89" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed 8 bit integer from the underlying reader.</p>
<p>Note that since this reads a single byte, no byte order conversions
are used. It is included for completeness.</p>
<h1 id="errors-1" class="section-header"><a href="#errors-1">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
<p>Read signed 8 bit integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder::ReadBytesExt</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x02</span>, <span class="number">0xfb</span>]);
<span class="macro">assert_eq!</span>(<span class="number">2</span>, <span class="ident">rdr</span>.<span class="ident">read_i8</span>().<span class="ident">unwrap</span>());
<span class="macro">assert_eq!</span>(<span class="op">-</span><span class="number">5</span>, <span class="ident">rdr</span>.<span class="ident">read_i8</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u16" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u16" class="fnname">read_u16</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u16.html">u16</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#112-116" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned 16 bit integer from the underlying reader.</p>
<h1 id="errors-2" class="section-header"><a href="#errors-2">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
<p>Read unsigned 16 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">2</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">0</span>]);
<span class="macro">assert_eq!</span>(<span class="number">517</span>, <span class="ident">rdr</span>.<span class="ident">read_u16</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());
<span class="macro">assert_eq!</span>(<span class="number">768</span>, <span class="ident">rdr</span>.<span class="ident">read_u16</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i16" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i16" class="fnname">read_i16</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i16.html">i16</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#139-143" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed 16 bit integer from the underlying reader.</p>
<h1 id="errors-3" class="section-header"><a href="#errors-3">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
<p>Read signed 16 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x00</span>, <span class="number">0xc1</span>, <span class="number">0xff</span>, <span class="number">0x7c</span>]);
<span class="macro">assert_eq!</span>(<span class="number">193</span>, <span class="ident">rdr</span>.<span class="ident">read_i16</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());
<span class="macro">assert_eq!</span>(<span class="op">-</span><span class="number">132</span>, <span class="ident">rdr</span>.<span class="ident">read_i16</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u24" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u24" class="fnname">read_u24</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u32.html">u32</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#165-169" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned 24 bit integer from the underlying reader.</p>
<h1 id="errors-4" class="section-header"><a href="#errors-4">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
<p>Read unsigned 24 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x00</span>, <span class="number">0x01</span>, <span class="number">0x0b</span>]);
<span class="macro">assert_eq!</span>(<span class="number">267</span>, <span class="ident">rdr</span>.<span class="ident">read_u24</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i24" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i24" class="fnname">read_i24</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#191-195" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed 24 bit integer from the underlying reader.</p>
<h1 id="errors-5" class="section-header"><a href="#errors-5">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
<p>Read signed 24 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0xff</span>, <span class="number">0x7a</span>, <span class="number">0x33</span>]);
<span class="macro">assert_eq!</span>(<span class="op">-</span><span class="number">34253</span>, <span class="ident">rdr</span>.<span class="ident">read_i24</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u32" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u32" class="fnname">read_u32</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u32.html">u32</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#217-221" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned 32 bit integer from the underlying reader.</p>
<h1 id="errors-6" class="section-header"><a href="#errors-6">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
<p>Read unsigned 32 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x01</span>, <span class="number">0x0b</span>]);
<span class="macro">assert_eq!</span>(<span class="number">267</span>, <span class="ident">rdr</span>.<span class="ident">read_u32</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i32" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i32" class="fnname">read_i32</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#243-247" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed 32 bit integer from the underlying reader.</p>
<h1 id="errors-7" class="section-header"><a href="#errors-7">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
<p>Read signed 32 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0xff</span>, <span class="number">0xff</span>, <span class="number">0x7a</span>, <span class="number">0x33</span>]);
<span class="macro">assert_eq!</span>(<span class="op">-</span><span class="number">34253</span>, <span class="ident">rdr</span>.<span class="ident">read_i32</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u48" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u48" class="fnname">read_u48</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u64.html">u64</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#269-273" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned 48 bit integer from the underlying reader.</p>
<h1 id="errors-8" class="section-header"><a href="#errors-8">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
<p>Read unsigned 48 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0xb6</span>, <span class="number">0x71</span>, <span class="number">0x6b</span>, <span class="number">0xdc</span>, <span class="number">0x2b</span>, <span class="number">0x31</span>]);
<span class="macro">assert_eq!</span>(<span class="number">200598257150769</span>, <span class="ident">rdr</span>.<span class="ident">read_u48</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i48" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i48" class="fnname">read_i48</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#295-299" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed 48 bit integer from the underlying reader.</p>
<h1 id="errors-9" class="section-header"><a href="#errors-9">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
<p>Read signed 48 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x9d</span>, <span class="number">0x71</span>, <span class="number">0xab</span>, <span class="number">0xe7</span>, <span class="number">0x97</span>, <span class="number">0x8f</span>]);
<span class="macro">assert_eq!</span>(<span class="op">-</span><span class="number">108363435763825</span>, <span class="ident">rdr</span>.<span class="ident">read_i48</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u64" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u64" class="fnname">read_u64</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u64.html">u64</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#321-325" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned 64 bit integer from the underlying reader.</p>
<h1 id="errors-10" class="section-header"><a href="#errors-10">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
<p>Read an unsigned 64 bit big-endian integer from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x00</span>, <span class="number">0x03</span>, <span class="number">0x43</span>, <span class="number">0x95</span>, <span class="number">0x4d</span>, <span class="number">0x60</span>, <span class="number">0x86</span>, <span class="number">0x83</span>]);
<span class="macro">assert_eq!</span>(<span class="number">918733457491587</span>, <span class="ident">rdr</span>.<span class="ident">read_u64</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i64" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i64" class="fnname">read_i64</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#347-351" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed 64 bit integer from the underlying reader.</p>
<h1 id="errors-11" class="section-header"><a href="#errors-11">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
<p>Read a signed 64 bit big-endian integer from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x80</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">i64::min_value</span>(), <span class="ident">rdr</span>.<span class="ident">read_i64</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u128" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u128" class="fnname">read_u128</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u128.html">u128</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#376-380" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned 128 bit integer from the underlying reader.</p>
<h1 id="errors-12" class="section-header"><a href="#errors-12">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
<p>Read an unsigned 128 bit big-endian integer from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0x00</span>, <span class="number">0x03</span>, <span class="number">0x43</span>, <span class="number">0x95</span>, <span class="number">0x4d</span>, <span class="number">0x60</span>, <span class="number">0x86</span>, <span class="number">0x83</span>,
    <span class="number">0x00</span>, <span class="number">0x03</span>, <span class="number">0x43</span>, <span class="number">0x95</span>, <span class="number">0x4d</span>, <span class="number">0x60</span>, <span class="number">0x86</span>, <span class="number">0x83</span>
]);
<span class="macro">assert_eq!</span>(<span class="number">16947640962301618749969007319746179</span>, <span class="ident">rdr</span>.<span class="ident">read_u128</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i128" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i128" class="fnname">read_i128</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i128.html">i128</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#402-406" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed 128 bit integer from the underlying reader.</p>
<h1 id="errors-13" class="section-header"><a href="#errors-13">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
<p>Read a signed 128 bit big-endian integer from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x80</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]);
<span class="macro">assert_eq!</span>(<span class="ident">i128::min_value</span>(), <span class="ident">rdr</span>.<span class="ident">read_i128</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_uint" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_uint" class="fnname">read_uint</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u64.html">u64</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#427-431" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned n-bytes integer from the underlying reader.</p>
<h1 id="errors-14" class="section-header"><a href="#errors-14">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
<p>Read an unsigned n-byte big-endian integer from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0x80</span>, <span class="number">0x74</span>, <span class="number">0xfa</span>]);
<span class="macro">assert_eq!</span>(<span class="number">8418554</span>, <span class="ident">rdr</span>.<span class="ident">read_uint</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="number">3</span>).<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_int" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_int" class="fnname">read_int</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#452-456" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed n-bytes integer from the underlying reader.</p>
<h1 id="errors-15" class="section-header"><a href="#errors-15">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-16" class="section-header"><a href="#examples-16">Examples</a></h1>
<p>Read an unsigned n-byte big-endian integer from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0xc1</span>, <span class="number">0xff</span>, <span class="number">0x7c</span>]);
<span class="macro">assert_eq!</span>(<span class="op">-</span><span class="number">4063364</span>, <span class="ident">rdr</span>.<span class="ident">read_int</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="number">3</span>).<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_uint128" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_uint128" class="fnname">read_uint128</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u128.html">u128</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#460-464" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads an unsigned n-bytes integer from the underlying reader.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_int128" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_int128" class="fnname">read_int128</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i128.html">i128</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#468-472" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a signed n-bytes integer from the underlying reader.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_f32" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_f32" class="fnname">read_f32</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#499-503" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a IEEE754 single-precision (4 bytes) floating point number from
the underlying reader.</p>
<h1 id="errors-16" class="section-header"><a href="#errors-16">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-17" class="section-header"><a href="#examples-17">Examples</a></h1>
<p>Read a big-endian single-precision floating point number from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::f32</span>;
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;

<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0x40</span>, <span class="number">0x49</span>, <span class="number">0x0f</span>, <span class="number">0xdb</span>,
]);
<span class="macro">assert_eq!</span>(<span class="ident">f32::consts::PI</span>, <span class="ident">rdr</span>.<span class="ident">read_f32</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_f64" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_f64" class="fnname">read_f64</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#530-534" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a IEEE754 double-precision (8 bytes) floating point number from
the underlying reader.</p>
<h1 id="errors-17" class="section-header"><a href="#errors-17">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-18" class="section-header"><a href="#examples-18">Examples</a></h1>
<p>Read a big-endian double-precision floating point number from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::f64</span>;
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;

<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0x40</span>, <span class="number">0x09</span>, <span class="number">0x21</span>, <span class="number">0xfb</span>, <span class="number">0x54</span>, <span class="number">0x44</span>, <span class="number">0x2d</span>, <span class="number">0x18</span>,
]);
<span class="macro">assert_eq!</span>(<span class="ident">f64::consts::PI</span>, <span class="ident">rdr</span>.<span class="ident">read_f64</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>());</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u16_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u16_into" class="fnname">read_u16_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u16.html">u16</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#562-569" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of unsigned 16 bit integers from the underlying
reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-18" class="section-header"><a href="#errors-18">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-19" class="section-header"><a href="#examples-19">Examples</a></h1>
<p>Read a sequence of unsigned 16 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">2</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">0</span>]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_u16_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">517</span>, <span class="number">768</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u32_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u32_into" class="fnname">read_u32_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#597-604" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of unsigned 32 bit integers from the underlying
reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-19" class="section-header"><a href="#errors-19">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-20" class="section-header"><a href="#examples-20">Examples</a></h1>
<p>Read a sequence of unsigned 32 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">2</span>, <span class="number">5</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_u32_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">517</span>, <span class="number">768</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u64_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u64_into" class="fnname">read_u64_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#635-642" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of unsigned 64 bit integers from the underlying
reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-20" class="section-header"><a href="#errors-20">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-21" class="section-header"><a href="#examples-21">Examples</a></h1>
<p>Read a sequence of unsigned 64 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">2</span>, <span class="number">5</span>,
    <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>,
]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_u64_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">517</span>, <span class="number">768</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_u128_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_u128_into" class="fnname">read_u128_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u128.html">u128</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#673-683" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of unsigned 128 bit integers from the underlying
reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-21" class="section-header"><a href="#errors-21">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-22" class="section-header"><a href="#examples-22">Examples</a></h1>
<p>Read a sequence of unsigned 128 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">2</span>, <span class="number">5</span>,
    <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>,
]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_u128_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">517</span>, <span class="number">768</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i8_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i8_into" class="fnname">read_i8_into</a>(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i8.html">i8</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#716-719" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of signed 8 bit integers from the underlying reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<p>Note that since each <code>i8</code> is a single byte, no byte order conversions
are used. This method is included because it provides a safe, simple
way for the caller to read into a <code>&amp;mut [i8]</code> buffer. (Without this
method, the caller would have to either use <code>unsafe</code> code or convert
each byte to <code>i8</code> individually.)</p>
<h1 id="errors-22" class="section-header"><a href="#errors-22">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-23" class="section-header"><a href="#examples-23">Examples</a></h1>
<p>Read a sequence of signed 8 bit integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">2</span>, <span class="number">251</span>, <span class="number">3</span>]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">3</span>];
<span class="ident">rdr</span>.<span class="ident">read_i8_into</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">2</span>, <span class="op">-</span><span class="number">5</span>, <span class="number">3</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i16_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i16_into" class="fnname">read_i16_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i16.html">i16</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#747-754" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of signed 16 bit integers from the underlying
reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-23" class="section-header"><a href="#errors-23">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-24" class="section-header"><a href="#examples-24">Examples</a></h1>
<p>Read a sequence of signed 16 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">2</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">0</span>]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_i16_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">517</span>, <span class="number">768</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i32_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i32_into" class="fnname">read_i32_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i32.html">i32</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#782-789" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of signed 32 bit integers from the underlying
reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-24" class="section-header"><a href="#errors-24">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-25" class="section-header"><a href="#examples-25">Examples</a></h1>
<p>Read a sequence of signed 32 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">2</span>, <span class="number">5</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_i32_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">517</span>, <span class="number">768</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i64_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i64_into" class="fnname">read_i64_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#820-827" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of signed 64 bit integers from the underlying
reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-25" class="section-header"><a href="#errors-25">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-26" class="section-header"><a href="#examples-26">Examples</a></h1>
<p>Read a sequence of signed 64 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">2</span>, <span class="number">5</span>,
    <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>,
]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_i64_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">517</span>, <span class="number">768</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_i128_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_i128_into" class="fnname">read_i128_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i128.html">i128</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#858-868" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of signed 128 bit integers from the underlying
reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-26" class="section-header"><a href="#errors-26">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-27" class="section-header"><a href="#examples-27">Examples</a></h1>
<p>Read a sequence of signed 128 bit big-endian integers from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;
<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">2</span>, <span class="number">5</span>,
    <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>,
]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_i128_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="number">517</span>, <span class="number">768</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_f32_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_f32_into" class="fnname">read_f32_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#902-909" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of IEEE754 single-precision (4 bytes) floating
point numbers from the underlying reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-27" class="section-header"><a href="#errors-27">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-28" class="section-header"><a href="#examples-28">Examples</a></h1>
<p>Read a sequence of big-endian single-precision floating point number
from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::f32</span>;
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;

<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0x40</span>, <span class="number">0x49</span>, <span class="number">0x0f</span>, <span class="number">0xdb</span>,
    <span class="number">0x3f</span>, <span class="number">0x80</span>, <span class="number">0x00</span>, <span class="number">0x00</span>,
]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0.0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_f32_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="ident">f32::consts::PI</span>, <span class="number">1.0</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_f32_into_unchecked" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_f32_into_unchecked" class="fnname">read_f32_into_unchecked</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a><br>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#948-953" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.2.0: <p>please use <code>read_f32_into</code> instead</p>
</div></div><div class="docblock"><p><strong>DEPRECATED</strong>.</p>
<p>This method is deprecated. Use <code>read_f32_into</code> instead.</p>
<p>Reads a sequence of IEEE754 single-precision (4 bytes) floating
point numbers from the underlying reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-28" class="section-header"><a href="#errors-28">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-29" class="section-header"><a href="#examples-29">Examples</a></h1>
<p>Read a sequence of big-endian single-precision floating point number
from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::f32</span>;
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;

<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0x40</span>, <span class="number">0x49</span>, <span class="number">0x0f</span>, <span class="number">0xdb</span>,
    <span class="number">0x3f</span>, <span class="number">0x80</span>, <span class="number">0x00</span>, <span class="number">0x00</span>,
]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0.0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_f32_into_unchecked</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="ident">f32::consts::PI</span>, <span class="number">1.0</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_f64_into" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_f64_into" class="fnname">read_f64_into</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(&amp;mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#987-994" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Reads a sequence of IEEE754 double-precision (8 bytes) floating
point numbers from the underlying reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="errors-29" class="section-header"><a href="#errors-29">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-30" class="section-header"><a href="#examples-30">Examples</a></h1>
<p>Read a sequence of big-endian single-precision floating point number
from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::f64</span>;
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;

<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0x40</span>, <span class="number">0x09</span>, <span class="number">0x21</span>, <span class="number">0xfb</span>, <span class="number">0x54</span>, <span class="number">0x44</span>, <span class="number">0x2d</span>, <span class="number">0x18</span>,
    <span class="number">0x3f</span>, <span class="number">0xF0</span>, <span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x00</span>,
]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0.0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_f64_into</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="ident">f64::consts::PI</span>, <span class="number">1.0</span>], <span class="ident">dst</span>);</pre></div>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.read_f64_into_unchecked" class="method has-srclink"><h4 class="code-header">fn <a href="#method.read_f64_into_unchecked" class="fnname">read_f64_into_unchecked</a>&lt;T:&nbsp;<a class="trait" href="trait.ByteOrder.html" title="trait byteorder::ByteOrder">ByteOrder</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;dst: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a><br>) -&gt; <a class="type" href="https://doc.rust-lang.org/1.54.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</h4><a class="srclink" href="../src/byteorder/io.rs.html#1039-1044" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.2.0: <p>please use <code>read_f64_into</code> instead</p>
</div></div><div class="docblock"><p><strong>DEPRECATED</strong>.</p>
<p>This method is deprecated. Use <code>read_f64_into</code> instead.</p>
<p>Reads a sequence of IEEE754 double-precision (8 bytes) floating
point numbers from the underlying reader.</p>
<p>The given buffer is either filled completely or an error is returned.
If an error is returned, the contents of <code>dst</code> are unspecified.</p>
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
<p>This method is unsafe because there are no guarantees made about the
floating point values. In particular, this method does not check for
signaling NaNs, which may result in undefined behavior.</p>
<h1 id="errors-30" class="section-header"><a href="#errors-30">Errors</a></h1>
<p>This method returns the same errors as <a href="https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact"><code>Read::read_exact</code></a>.</p>
<h1 id="examples-31" class="section-header"><a href="#examples-31">Examples</a></h1>
<p>Read a sequence of big-endian single-precision floating point number
from a <code>Read</code>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std::f64</span>;
<span class="kw">use</span> <span class="ident">std::io::Cursor</span>;

<span class="kw">use</span> <span class="ident">byteorder</span>::{<span class="ident">BigEndian</span>, <span class="ident">ReadBytesExt</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rdr</span> <span class="op">=</span> <span class="ident">Cursor::new</span>(<span class="macro">vec!</span>[
    <span class="number">0x40</span>, <span class="number">0x09</span>, <span class="number">0x21</span>, <span class="number">0xfb</span>, <span class="number">0x54</span>, <span class="number">0x44</span>, <span class="number">0x2d</span>, <span class="number">0x18</span>,
    <span class="number">0x3f</span>, <span class="number">0xF0</span>, <span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x00</span>, <span class="number">0x00</span>,
]);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> [<span class="number">0.0</span>; <span class="number">2</span>];
<span class="ident">rdr</span>.<span class="ident">read_f64_into_unchecked</span>::<span class="op">&lt;</span><span class="ident">BigEndian</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">dst</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq!</span>([<span class="ident">f64::consts::PI</span>, <span class="number">1.0</span>], <span class="ident">dst</span>);</pre></div>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-ReadBytesExt" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;R:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.54.0/std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="trait.ReadBytesExt.html" title="trait byteorder::ReadBytesExt">ReadBytesExt</a> for R</h3><a href="#impl-ReadBytesExt" class="anchor"></a><a class="srclink" href="../src/byteorder/io.rs.html#1049" title="goto source code">[src]</a></div><div class="docblock"><p>All types that implement <code>Read</code> get methods defined in <code>ReadBytesExt</code>
for free.</p>
</div></div><script type="text/javascript" src="../implementors/byteorder/trait.ReadBytesExt.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="byteorder" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>