pub struct WasmDetector { /* private fields */ }Expand description
Implementations§
Source§impl WasmDetector
impl WasmDetector
Sourcepub fn from_file(
repo_root: impl Into<PathBuf>,
wasm_path: impl AsRef<Path>,
) -> Result<Self>
pub fn from_file( repo_root: impl Into<PathBuf>, wasm_path: impl AsRef<Path>, ) -> Result<Self>
Завантажує й компілює .wasm-компонент, лінкує WASI p3 (§3.9: guest
на wasm32-wasip3 фактично потребує wasi:cli/wasi:filesystem/
wasi:random/wasi:clocks навіть якщо власний wit/detector.wit
їх не імпортує напряму — рантайм std для цієї цілі лінкує їх
безумовно) і власний вужчий host-fs.
Sourcepub fn into_detect_fn(self) -> DetectFn
pub fn into_detect_fn(self) -> DetectFn
Перетворює на DetectFn — та сама інʼєкція, яку
PluginRegistry::new/replace_detector приймають від in-process
бекенда сьогодні (crates/harness/src/registry.rs).
Помилка САМОГО виклику (інстанціювання впало, трап тощо) мапиться в
Err(String) — той самий канал, яким detector.wit уже описує
“інфраструктурний збій самого виклику” (доккоментар
wit/detector.wit), а не мовчазний “чисто”.
Auto Trait Implementations§
impl !RefUnwindSafe for WasmDetector
impl !UnwindSafe for WasmDetector
impl Freeze for WasmDetector
impl Send for WasmDetector
impl Sync for WasmDetector
impl Unpin for WasmDetector
impl UnsafeUnpin for WasmDetector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more