MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / try_get

Method try_get

crates/firewheel-core/src/node.rs:1099–1103  ·  view source on GitHub ↗

Get an immutable reference to a resource in the store. Returns `None` if the given resource does not exist.

(&self)

Source from the content-addressed store, hash-verified

1097 /// store.
1098 pub fn contains<S: Send + 'static>(&self) -> bool {
1099 self.0.contains_key(&TypeId::of::<S>())
1100 }
1101
1102 /// Get an immutable reference to a resource in the store.
1103 ///
1104 /// # Panics
1105 /// Panics if the given resource does not exist.
1106 pub fn get<S: Send + 'static>(&self) -> &S {

Callers 1

getMethod · 0.80

Calls 2

downcast_refMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected