pub fn adapter_exercise() -> Result<(), String>
Expand description

Example of using the “Adapter” design pattern in rust.

This example adapts functions that:

  1. Accesses memory in 32-bit chunks instead of bytes
  2. Returns error codes but no human-readable error messages

The Adapter functions translate the 32-bit chunk access into arrays of bytes. The Adapter functions also provide human-readable messages for error codes.