Struct binreader::RandomAccessBinReader[][src]

pub struct RandomAccessBinReader { /* fields omitted */ }

Trait Implementations

Performs the conversion.

Generates a new BinReader using the provided slice, initial offset, and endidness. While the exact implementation of this varies from implementation to implementation, OwnableBinReaders will, more than likely, copy the data in the slice. Read more

The initial offset of the BinReader. For more information, see the Offsets section of the BinReader documentation. Read more

Checks whether or not there is any data left, based off of the BinReader::current_offset. Read more

The amount of data in the reader. If the reader’s size changes (which none of the implementations currently do), then this should return how much data was initially in the reader. Read more

The amount of data left, based off of the BinReader::current_offset.

The current offset of the reader’s cursor.

The endidness of the reader.

Changes the default endidness.

Sets the reader’s BinReader::current_offset.

Alters the BinReader::current_offset by the given amount.

Gets the current byte and then advances the cursor.

Returns a Bytes object of the requested size containing the next n bytes (where n is the num_bytes parameter) and then advances the cursor by that much. Read more

Functions the same as the BinReader::from_slice_with_offset, except the initial offset is always 0. Read more

The lowest valid offset that can be requested. By default, this is the same as BinReader::initial_offset. Read more

The highest valid offset that can be requested. By default, this is the reader’s BinReader::size plus its BinReader::initial_offset. Read more

A helper method that validates an offset (mostly used by reader implementations). Read more

Takes an absolute offset and converts it to a relative offset, based off of the BinReader::current_offset. Read more

Returns true if the next bytes are the same as the ones provided.

Fills the provided buffer with bytes, starting at the provided offset. This does not alter the BinReader::current_offset. Read more

Returns a subsequence (i.e. a &[u8]) of data of the requested size beginning at the provided offset. Read more

Returns a slice of the data between the provided starting and ending offsets.

Fills the provided buffer with the next n bytes, where n is the length of the buffer. This then advances the BinReader::current_offset by n. Read more

Gets the u8 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the nelong endian i8 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the belong endian u16 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the lelong endian u16 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the belong endian i16 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the lelong endian i16 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the belong endian u32 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the lelong endian u32 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the belong endian i32 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the lelong endian i32 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the belong endian u64 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the lelong endian u64 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the belong endian i64 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the lelong endian i64 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the belong endian u128 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the lelong endian u128 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the belong endian i128 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the lelong endian i128 at the BinReader::current_offset without altering the BinReader::current_offset. Read more

Gets the u8 at the provided offset without altering the BinReader::current_offset.

Gets the nelong endian i8 at the provided offset without altering the BinReader::current_offset. Read more

Gets the belong endian u16 at the provided offset without altering the BinReader::current_offset. Read more

Gets the lelong endian u16 at the provided offset without altering the BinReader::current_offset. Read more

Gets the belong endian i16 at the provided offset without altering the BinReader::current_offset. Read more

Gets the lelong endian i16 at the provided offset without altering the BinReader::current_offset. Read more

Gets the belong endian u32 at the provided offset without altering the BinReader::current_offset. Read more

Gets the lelong endian u32 at the provided offset without altering the BinReader::current_offset. Read more

Gets the belong endian i32 at the provided offset without altering the BinReader::current_offset. Read more

Gets the lelong endian i32 at the provided offset without altering the BinReader::current_offset. Read more

Gets the belong endian u64 at the provided offset without altering the BinReader::current_offset. Read more

Gets the lelong endian u64 at the provided offset without altering the BinReader::current_offset. Read more

Gets the belong endian i64 at the provided offset without altering the BinReader::current_offset. Read more

Gets the lelong endian i64 at the provided offset without altering the BinReader::current_offset. Read more

Gets the belong endian u128 at the provided offset without altering the BinReader::current_offset. Read more

Gets the lelong endian u128 at the provided offset without altering the BinReader::current_offset. Read more

Gets the belong endian i128 at the provided offset without altering the BinReader::current_offset. Read more

Gets the lelong endian i128 at the provided offset without altering the BinReader::current_offset. Read more

Gets the u16 using the default endidness at the provided offset without altering the BinReader::current_offset. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the u32 using the default endidness at the provided offset without altering the BinReader::current_offset. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the u64 using the default endidness at the provided offset without altering the BinReader::current_offset. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the u128 using the default endidness at the provided offset without altering the BinReader::current_offset. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i16 using the default endidness at the provided offset without altering the BinReader::current_offset. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i32 using the default endidness at the provided offset without altering the BinReader::current_offset. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i64 using the default endidness at the provided offset without altering the BinReader::current_offset. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i128 using the default endidness at the provided offset without altering the BinReader::current_offset. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the nelong endian i8 at the BinReader::current_offset and then advances it by 1. Read more

Gets the belong endian u16 at the BinReader::current_offset and then advances it by 1. Read more

Gets the lelong endian u16 at the BinReader::current_offset and then advances it by 1. Read more

Gets the belong endian i16 at the BinReader::current_offset and then advances it by 1. Read more

Gets the lelong endian i16 at the BinReader::current_offset and then advances it by 1. Read more

Gets the belong endian u32 at the BinReader::current_offset and then advances it by 1. Read more

Gets the lelong endian u32 at the BinReader::current_offset and then advances it by 1. Read more

Gets the belong endian i32 at the BinReader::current_offset and then advances it by 1. Read more

Gets the lelong endian i32 at the BinReader::current_offset and then advances it by 1. Read more

Gets the belong endian u64 at the BinReader::current_offset and then advances it by 1. Read more

Gets the lelong endian u64 at the BinReader::current_offset and then advances it by 1. Read more

Gets the belong endian i64 at the BinReader::current_offset and then advances it by 1. Read more

Gets the lelong endian i64 at the BinReader::current_offset and then advances it by 1. Read more

Gets the belong endian u128 at the BinReader::current_offset and then advances it by 1. Read more

Gets the lelong endian u128 at the BinReader::current_offset and then advances it by 1. Read more

Gets the belong endian i128 at the BinReader::current_offset and then advances it by 1. Read more

Gets the lelong endian i128 at the BinReader::current_offset and then advances it by 1. Read more

Gets the u16 using the default endidness at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the u16 using the default endidness at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the u16 using the default endidness at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the u16 using the default endidness at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i8 at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i16 using the default endidness at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i32 using the default endidness at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i64 using the default endidness at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Gets the i128 using the default endidness at the BinReader::current_offset and then advances it by 1. If the current endidness is Endidness::Unknown, then an error is returned. Read more

Immutably borrows from an owned value. Read more

Returns the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more

Tells this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to read. Read more

🔬 This is a nightly-only experimental API. (buf_read_has_data_left)

recently added

Check if the underlying Read has any data left to be read. Read more

Read all bytes into buf until the delimiter byte or EOF is reached. Read more

Read all bytes until a newline (the 0xA byte) is reached, and append them to the provided buffer. Read more

Returns an iterator over the contents of this reader split on the byte byte. Read more

Returns an iterator over the lines of this reader. Read more

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more

Like read, except that it reads into a slice of buffers. Read more

🔬 This is a nightly-only experimental API. (can_vector)

Determines if this Reader has an efficient read_vectored implementation. Read more

🔬 This is a nightly-only experimental API. (read_initializer)

Determines if this Reader can work with buffers of uninitialized memory. Read more

Read all bytes until EOF in this source, placing them into buf. Read more

Read all bytes until EOF in this source, appending them to buf. Read more

Read the exact number of bytes required to fill buf. Read more

Creates a “by reference” adaptor for this instance of Read. Read more

Transforms this Read instance to an Iterator over its bytes. Read more

Creates an adaptor which will chain this stream with another. Read more

Creates an adaptor which will read at most limit bytes from it. Read more

Seek to an offset, in bytes, in a stream. Read more

🔬 This is a nightly-only experimental API. (seek_rewind)

Rewind to the beginning of a stream. Read more

🔬 This is a nightly-only experimental API. (seek_stream_len)

Returns the length of this stream (in bytes). Read more

Returns the current seek position from the start of the stream. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.