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

Method take

cranelift/entity/src/packed_option.rs:87–89  ·  view source on GitHub ↗

Takes the value out of the packed option, leaving a `None` in its place.

(&mut self)

Source from the content-addressed store, hash-verified

85
86 /// Takes the value out of the packed option, leaving a `None` in its place.
87 pub fn take(&mut self) -> Option<T> {
88 mem::replace(self, None.into()).expand()
89 }
90}
91
92impl<T: ReservedValue> Default for PackedOption<T> {

Callers

nothing calls this directly

Calls 2

replaceFunction · 0.50
expandMethod · 0.45

Tested by

no test coverage detected