Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bytecodealliance/wasmtime
/ from_error
Function
from_error
crates/core/tests/tests.rs:147–151 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
145
146
#[test]
147
fn from_error() {
148
let error = Error::from(TestError(42));
149
assert!(error.is::<TestError>());
150
assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 42);
151
}
152
153
#[test]
154
fn into_boxed_dyn_error() {
Callers
nothing calls this directly
Calls
2
from
Function · 0.85
TestError
Class · 0.70
Tested by
no test coverage detected