rstd 0.1.0
Loading...
Searching...
No Matches
rstd::io::Cursor< T > Class Template Referenceexport
module rstd

In-memory reader/writer with a position cursor. More...

Public Member Functions

auto get_ref () const noexcept -> const T &
 Returns a reference to the underlying value in this cursor.
 
auto get_mut () noexcept -> T &
 Returns a mutable reference to the underlying value in this cursor.
 
auto position () const noexcept -> u64
 Returns the current position of this cursor.
 
void set_position (u64 p) noexcept
 Sets the position of this cursor.
 
auto into_inner () -> T
 Consumes this cursor, returning the underlying value.
 

Detailed Description

template<typename T>
class rstd::io::Cursor< T >

In-memory reader/writer with a position cursor.

Supported inner types: Vec<u8> (R+W+Seek+BufRead), slice<u8> (R+Seek+BufRead).

Member Function Documentation

◆ set_position()

template<typename T >
void rstd::io::Cursor< T >::set_position ( u64 p)
inlinenoexcept

Sets the position of this cursor.

Parameters
pThe new byte offset from the start.

The documentation for this class was generated from the following file: