Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/fadeevab/design-patterns-rust
/ client_code
Function
client_code
behavioral/template-method/main.rs:55–57 ·
view source on GitHub ↗
(concrete: impl TemplateMethod)
Source
from the content-addressed store, hash-verified
53
}
54
55
fn client_code(concrete: impl TemplateMethod) {
56
concrete.template_method()
57
}
58
59
fn main() {
60
println!(
"Same client code can work with different concrete implementations:"
);
Callers
1
main
Function · 0.85
Calls
1
template_method
Method · 0.80
Tested by
no test coverage detected