pub struct Library { /* private fields */ }Expand description
Handle to a loaded TFLite shared library.
Library wraps the FFI function table produced by libloading and
bindgen, providing safe construction via auto-discovery or an explicit
filesystem path.
§Examples
use edgefirst_tflite::Library;
// Auto-discover TFLite library
let lib = Library::new()?;
// Or load from a specific path
let lib = Library::from_path("/usr/lib/libtensorflowlite_c.so")?;Implementations§
Source§impl Library
impl Library
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Discover and load the TFLite shared library automatically.
This probes well-known versioned and unversioned library paths using
the edgefirst_tflite_sys::discovery module.
§Errors
Returns an Error if no compatible TFLite library can be found.
Sourcepub fn as_sys(&self) -> &tensorflowlite_c
pub fn as_sys(&self) -> &tensorflowlite_c
Returns a reference to the underlying FFI function table.
This is an escape hatch for advanced users who need direct access to
the raw tensorflowlite_c bindings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Library
impl RefUnwindSafe for Library
impl Unpin for Library
impl UnsafeUnpin for Library
impl UnwindSafe for Library
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