MCPcopy Index your code
hub / github.com/endbasic/endbasic / add_clearable

Method add_clearable

std/src/lib.rs:312–314  ·  view source on GitHub ↗

Registers the given clearable. In the common case, functions and commands hold a reference to the out-of-machine state they interact with. This state is invisible from here, but we may need to have access to it to reset it as part of the `clear` operation. In those cases, such state must be registered via this hook.

(&mut self, clearable: Box<dyn Clearable>)

Source from the content-addressed store, hash-verified

310 /// to it to reset it as part of the `clear` operation. In those cases, such state must be
311 /// registered via this hook.
312 pub fn add_clearable(&mut self, clearable: Box<dyn Clearable>) {
313 self.clearables.push(clearable);
314 }
315
316 /// Returns the current yielder, if one has been configured.
317 pub fn yielder(&self) -> Option<Rc<RefCell<dyn Yielder>>> {

Callers 4

add_allFunction · 0.80
add_allFunction · 0.80
add_allFunction · 0.80
add_allFunction · 0.80

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected