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

Method try_get_mut

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

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

(&mut self)

Source from the content-addressed store, hash-verified

1106 pub fn get<S: Send + 'static>(&self) -> &S {
1107 self.try_get().unwrap()
1108 }
1109
1110 /// Get a mutable reference to a resource in the store.
1111 ///
1112 /// # Panics
1113 /// Panics if the given resource does not exist.
1114 pub fn get_mut<S: Send + 'static>(&mut self) -> &mut S {
1115 self.try_get_mut().unwrap()

Callers 1

get_mutMethod · 0.80

Calls 2

downcast_mutMethod · 0.80
get_mutMethod · 0.45

Tested by

no test coverage detected