MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / expand

Method expand

cranelift/entity/src/packed_option.rs:62–64  ·  view source on GitHub ↗

Expand the packed option into a normal `Option`.

(self)

Source from the content-addressed store, hash-verified

60
61 /// Expand the packed option into a normal `Option`.
62 pub fn expand(self) -> Option<T> {
63 if self.is_none() { None } else { Some(self.0) }
64 }
65
66 /// Maps a `PackedOption<T>` to `Option<U>` by applying a function to a contained value.
67 pub fn map<U, F>(self, f: F) -> Option<U>

Callers 5

mapMethod · 0.45
unwrapMethod · 0.45
expectMethod · 0.45
takeMethod · 0.45
fromMethod · 0.45

Calls 1

is_noneMethod · 0.45

Tested by

no test coverage detected