Use Structural Typing to safely close any resource while using it in a transparent manner.