seqbytes
The seqbytes crate provides the traits ESeqByteReader and SeqByteReader used for reading bytes sequentially. The SeqByteReader trait convert the bytes into the
specified generic type, denoted U, which must implement SizedNumber. The trait SizedNumber represents a type which can be converted to and from bytes, with a
fixed size in bytes.
The trait ESeqByteReader is used for reading bytes sequentially, converting to a type with a specific endianness. The type converted to must implement EndianNumber,
which represents a type which can be converted to and from bytes with a specific endianness.
Implementations
The traits ESeqByteReader and SeqByteReader are implemented by default on types implementing Read + Seek.
Example
use *;
use Cursor;
let a = vec!;
let mut cursor = new;
let num: i32 = cursor.shift.unwrap;
let s = &*cursor.shift_string.unwrap;
assert_eq!;
assert_eq!;
Usage
Add this to your Cargo.toml:
[]
= "0.1.0"
License
seqbytes is distributed under the Apache v2.0 License.
See LICENSE.md for details.