pub struct LlamaBackend { /* private fields */ }Expand description
RAII proof that the ik_llama.cpp backend has been initialized.
Initialization is a process-wide singleton (like llama.cpp itself). Hold one
LlamaBackend for the lifetime of your models/contexts; dropping it calls
llama_backend_free.
Implementations§
Source§impl LlamaBackend
impl LlamaBackend
Sourcepub fn init() -> Result<Self, LlamaError>
pub fn init() -> Result<Self, LlamaError>
Initialize the backend. Returns LlamaError::BackendAlreadyInitialized
if a LlamaBackend is already live in this process.
Trait Implementations§
Source§impl Debug for LlamaBackend
impl Debug for LlamaBackend
Source§impl Drop for LlamaBackend
impl Drop for LlamaBackend
Auto Trait Implementations§
impl Freeze for LlamaBackend
impl RefUnwindSafe for LlamaBackend
impl Send for LlamaBackend
impl Sync for LlamaBackend
impl Unpin for LlamaBackend
impl UnsafeUnpin for LlamaBackend
impl UnwindSafe for LlamaBackend
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