Function design_pattern_examples_rust::bridge::bridge_exercise
source · pub fn bridge_exercise() -> Result<(), String>
Expand description
Example of using the “Bridge” pattern.
In this example, the Bridge pattern is used to allow a program to offer multiple ways to perform logging without changing how the logging is used throughout the program.
In this exercise, note how the calls into the logger are the same regardless of the logger used.