pub trait SystemCallback {
// Provided methods
fn preupdate(system: System, userdata: *mut c_void) -> Result<()> { ... }
fn postupdate(system: System, userdata: *mut c_void) -> Result<()> { ... }
fn bank_unload(
system: System,
bank: Bank,
userdata: *mut c_void,
) -> Result<()> { ... }
fn liveupdate_connected(system: System, userdata: *mut c_void) -> Result<()> { ... }
fn liveupdate_disconnected(
system: System,
userdata: *mut c_void,
) -> Result<()> { ... }
}
Available on crate feature
studio
only.Expand description
Trait for this particular FMOD callback.
No self
parameter is passed to the callback!
Callbacks are called from the Studio Update Thread in default / async mode and the main (calling) thread in synchronous mode.
Provided Methods§
Sourcefn preupdate(system: System, userdata: *mut c_void) -> Result<()>
fn preupdate(system: System, userdata: *mut c_void) -> Result<()>
Called at the start of the main Studio update. For async mode this will be on its own thread.
Sourcefn postupdate(system: System, userdata: *mut c_void) -> Result<()>
fn postupdate(system: System, userdata: *mut c_void) -> Result<()>
Called at the end of the main Studio update. For async mode this will be on its own thread.
Sourcefn bank_unload(system: System, bank: Bank, userdata: *mut c_void) -> Result<()>
fn bank_unload(system: System, bank: Bank, userdata: *mut c_void) -> Result<()>
Called directly when a bank has just been unloaded, after all resources are freed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.