Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ImageOptim/libimagequant
/ get_or
Method
get_or
src/rayoff.rs:13–15 ·
view source on GitHub ↗
(&self, f: impl FnOnce() -> T)
Source
from the content-addressed store, hash-verified
11
12
#[inline(always)]
13
pub fn get_or(&self, f: impl FnOnce() -> T) -> &T {
14
self.0.get_or_init(f)
15
}
16
17
#[inline(always)]
18
pub fn get_or_try<E>(&self, f: impl FnOnce() -> Result<T, E>) -> Result<&T, E> {
Callers
1
iteration
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected