MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / enter

Method enter

splashsurf_lib/src/profiling.rs:136–140  ·  view source on GitHub ↗

Enter a scope with the given name and push it onto the stack of scopes. It will be a child scope of the current top of the stack.

(&mut self, name: &'static str)

Source from the content-addressed store, hash-verified

134
135 /// Enter a scope with the given name and push it onto the stack of scopes. It will be a child scope of the current top of the stack.
136 pub fn enter(&mut self, name: &'static str) -> (Guard, ScopeId) {
137 // TODO: If the scope on top of the stack has the same name, use the next one as parent, to avoid huge chains for recursive functions
138 let id = self.new_id(name, self.scope_stack.last());
139 self.enter_with_id(name, id)
140 }
141
142 /// Enter a scope with the given name and push it onto the stack of scopes. It will be manually assigned as a child of the given parent scope.
143 pub fn enter_with_parent(&mut self, name: &'static str, parent: &ScopeId) -> (Guard, ScopeId) {

Callers

nothing calls this directly

Calls 2

new_idMethod · 0.80
enter_with_idMethod · 0.80

Tested by

no test coverage detected