Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ try_from
Method
try_from
crates/stdlib/src/_opcode.rs:26–33 ·
view source on GitHub ↗
(value: i32)
Source
from the content-addressed store, hash-verified
24
type Error = ();
25
26
fn try_from(value: i32) -> Result<Self, Self::Error> {
27
Ok(Self(
28
u16::try_from(value)
29
.map_err(|_| ())?
30
.try_into()
31
.map_err(|_| ())?,
32
))
33
}
34
}
35
36
impl Opcode {
Callers
nothing calls this directly
Calls
1
Self
Function · 0.85
Tested by
no test coverage detected