pub struct AsyncReadInfo { /* private fields */ }
Expand description
Information about a single asynchronous file operation.
Implementations§
Source§impl AsyncReadInfo
impl AsyncReadInfo
Sourcepub fn handle(&self) -> *mut c_void
pub fn handle(&self) -> *mut c_void
File handle that was returned in FileSystem::open
.
Sourcepub fn priority(&self) -> c_int
pub fn priority(&self) -> c_int
Priority hint for how quickly this operation should be serviced where 0 represents low importance and 100 represents extreme importance. This could be used to prioritize the read order of a file job queue for example. FMOD decides the importance of the read based on if it could degrade audio or not.
Sourcepub fn userdata(&self) -> *mut c_void
pub fn userdata(&self) -> *mut c_void
User value associated with this async operation, passed to FileSystemAsync::cancel
.
Sourcepub unsafe fn set_userdata(&mut self, userdata: *mut c_void)
pub unsafe fn set_userdata(&mut self, userdata: *mut c_void)
Set the user value associated with this async operation.
§Safety
You cannot call this while a AsyncCancelInfo
with the same raw pointer is live.
Sourcepub fn raw(&self) -> *mut FMOD_ASYNCREADINFO
pub fn raw(&self) -> *mut FMOD_ASYNCREADINFO
Get the raw pointer associated with this AsyncReadInfo
.
Sourcepub fn buffer(&mut self) -> FileBuffer<'_> ⓘ
pub fn buffer(&mut self) -> FileBuffer<'_> ⓘ
Get the FileBuffer
associated with this AsyncReadInfo
.
Sourcepub unsafe fn finish(self, result: Result<()>)
pub unsafe fn finish(self, result: Result<()>)
Signal the async read is done.
If AsyncReadInfo::written
!= AsyncReadInfo::size
this function will send an Error::FileEof
for you.
§Safety
If you have a AsyncCancelInfo
with the same raw pointer, it is immediately invalid after calling this function.