Struct sdl2::rwops::RWops
[−]
[src]
pub struct RWops<'a> { // some fields omitted }
A structure that provides an abstract interface to stream I/O.
Methods
impl<'a> RWops<'a>
unsafe fn raw(&self) -> *mut SDL_RWops
unsafe fn from_ll<'b>(raw: *mut SDL_RWops) -> RWops<'b>
fn from_file<P: AsRef<Path>>(path: P, mode: &str) -> SdlResult<RWops<'static>>
Creates an SDL file stream.
fn from_bytes(buf: &'a [u8]) -> SdlResult<RWops<'a>>
Prepares a read-only memory buffer for use with RWops
.
This method can only fail if the buffer size is zero.
fn from_bytes_mut(buf: &'a mut [u8]) -> SdlResult<RWops<'a>>
Prepares a read-write memory buffer for use with RWops
.
This method can only fail if the buffer size is zero.
fn len(&self) -> Option<usize>
Gets the stream's total size in bytes.
Returns None
if the stream size can't be determined
(either because it doesn't make sense for the stream type, or there was an error).