pub enum LoaderError {
LibraryNotFound {
library: &'static str,
candidates: Vec<&'static str>,
search_paths: usize,
},
SymbolNotFound {
library: &'static str,
symbol: &'static str,
},
VersionTooOld {
symbol: &'static str,
required: CudaVersion,
installed: CudaVersion,
},
Libloading(Error),
UnsupportedPlatform {
platform: &'static str,
},
}Expand description
An error raised by the dynamic loader.
These surface whenever an NVIDIA shared library or one of its symbols cannot be resolved at runtime — typically because CUDA is not installed, the installed driver is older than what baracuda was built against, or the user is on a platform NVIDIA doesn’t support.
Variants§
LibraryNotFound
None of the candidate library filenames resolved anywhere on the library search path.
SymbolNotFound
The library was loaded but did not export the requested symbol.
VersionTooOld
cuGetProcAddress returned CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT
for symbol: the installed driver does not provide it at the version
baracuda asked for.
Libloading(Error)
Raw libloading error — kept for platform-specific diagnostics that
the other variants can’t express (e.g. a missing dependency on a
chained .so).
UnsupportedPlatform
baracuda does not target this platform (e.g. macOS).
Implementations§
Source§impl LoaderError
impl LoaderError
Sourcepub fn library_not_found(
library: &'static str,
candidates: &[&'static str],
) -> Self
pub fn library_not_found( library: &'static str, candidates: &[&'static str], ) -> Self
Convenience constructor for the common case of “tried these names, none worked”.
Sourcepub fn library_not_found_with_search(
library: &'static str,
candidates: &[&'static str],
search_path_count: usize,
) -> Self
pub fn library_not_found_with_search( library: &'static str, candidates: &[&'static str], search_path_count: usize, ) -> Self
As above, but records how many directories were searched.
Trait Implementations§
Source§impl Debug for LoaderError
impl Debug for LoaderError
Source§impl Display for LoaderError
impl Display for LoaderError
Source§impl Error for LoaderError
impl Error for LoaderError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()