pub struct MediaEngineGuard { /* private fields */ }Expand description
Ties the lifetime of the process-wide media engines — and, after them, the
llama.cpp backend they share — to a scope: dropping the guard runs
release_media_engines.
Held for the whole of roteiro’s main, so the engines are destroyed while
Rust is still running destructors — before the C++ finalizers that would
otherwise abort the process (issue #291) — on the normal path, on an early
? error, and on an unwinding panic alike.
std::process::exit skips destructors, so any path that exits that way must
call release_media_engines itself first.
Implementations§
Trait Implementations§
Source§impl Debug for MediaEngineGuard
impl Debug for MediaEngineGuard
Source§impl Drop for MediaEngineGuard
impl Drop for MediaEngineGuard
Auto Trait Implementations§
impl Freeze for MediaEngineGuard
impl RefUnwindSafe for MediaEngineGuard
impl Send for MediaEngineGuard
impl Sync for MediaEngineGuard
impl Unpin for MediaEngineGuard
impl UnsafeUnpin for MediaEngineGuard
impl UnwindSafe for MediaEngineGuard
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