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

Method map

cranelift/entity/src/packed_option.rs:67–72  ·  view source on GitHub ↗

Maps a `PackedOption ` to `Option ` by applying a function to a contained value.

(self, f: F)

Source from the content-addressed store, hash-verified

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>
68 where
69 F: FnOnce(T) -> U,
70 {
71 self.expand().map(f)
72 }
73
74 /// Unwrap a packed `Some` value or panic.
75 #[track_caller]

Callers 6

get_disjoint_mutMethod · 0.45
fmtMethod · 0.45
nextMethod · 0.45
next_backMethod · 0.45
len_ofMethod · 0.45

Calls 1

expandMethod · 0.45

Tested by

no test coverage detected