pub struct FileContentsWrapper<T: FileContents> { /* private fields */ }
Expand description

A wrapper for a FileContents object. The wrapper provides some convenience methods and, most importantly, implements ReadRef for &FileContentsWrapper.

Implementations§

Append size bytes to buffer, starting to read at offset in the file. If successful, buffer must have had its len increased exactly by size, otherwise the caller may panic.

Trait Implementations§

Formats the value using the given formatter. Read more
The total size of the block of data.
Get a reference to a u8 slice at the given offset. Read more
Get a reference to a delimited u8 slice which starts at range.start. Read more
Get a reference to a u8 slice at the given offset, and update the offset. Read more
Get a reference to a Pod type at the given offset, and update the offset. Read more
Get a reference to a Pod type at the given offset. Read more
Get a reference to a slice of a Pod type at the given offset, and update the offset. Read more
Get a reference to a slice of a Pod type at the given offset. Read more
Provides a contiguous view of the source file composed of the requested position(s). 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.