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 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