Struct bridgestan::StanLibrary
source · pub struct StanLibrary { /* private fields */ }Expand description
A loaded shared library for a Stan model
Implementations§
source§impl StanLibrary
impl StanLibrary
sourcepub unsafe fn set_print_callback(
&mut self,
callback: extern "C" fn(_: *const c_char, _: usize)
) -> Result<(), BridgeStanError>
pub unsafe fn set_print_callback( &mut self, callback: extern "C" fn(_: *const c_char, _: usize) ) -> Result<(), BridgeStanError>
Provide a callback function to be called when Stan prints a message
§Safety
The provided function must never panic.
Since the call is protected by a mutex internally, it does not need to be thread safe.
sourcepub unsafe fn unload_library(self)
pub unsafe fn unload_library(self)
Unload the Stan library.
§Safety
There seem to be issues around unloading libraries in threaded code that are not fully understood: https://github.com/roualdes/bridgestan/issues/111
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StanLibrary
impl RefUnwindSafe for StanLibrary
impl Send for StanLibrary
impl Sync for StanLibrary
impl Unpin for StanLibrary
impl UnwindSafe for StanLibrary
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more