#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("import-hook engine error: {0}")]
Engine(#[from] plthook::Error),
#[error("no target module found for the requested scope: {0}")]
NoTargetModule(&'static str),
#[error(
"a hookfs installation is already active in this process (single active installation only)"
)]
AlreadyInstalled,
#[error("invalid mount name `{name}`: {reason}")]
InvalidMountName {
name: String,
reason: &'static str,
},
#[error("could not determine the size of the stream for `{name}`: {source}")]
StreamSize {
name: String,
source: std::io::Error,
},
#[error("hookfs shims are unavailable on this platform")]
UnsupportedPlatform,
}
pub type Result<T> = core::result::Result<T, Error>;