note-taking/src
Sofía Aritz c97700b29a Add structs `DecryptedNote`, `EncryptedNote` and `HiddenNote`
This makes some invalid states unrepresentable, which is something that is desired in this application to reduce mental complexity and to reduce the risk of undesired behaviour of aplying functions like `encrypt` on already encrypted notes.

`Note` is now an enum that holds the structs. This approach is similar to the one used in some parts of `std`, though in this case other approaches could be used, but they would be way too much verbose for this use case.

This change was done because having functions like `hide` on already hidden functions is not a good idea (even if was they do is "just" cloning the structure...).

There are some rough edges, but I'll improve them in another moment.
2023-03-16 22:28:17 +01:00
..
notes Add structs `DecryptedNote`, `EncryptedNote` and `HiddenNote` 2023-03-16 22:28:17 +01:00
password Add structs `DecryptedNote`, `EncryptedNote` and `HiddenNote` 2023-03-16 22:28:17 +01:00
saving Add structs `DecryptedNote`, `EncryptedNote` and `HiddenNote` 2023-03-16 22:28:17 +01:00
main.rs Add structs `DecryptedNote`, `EncryptedNote` and `HiddenNote` 2023-03-16 22:28:17 +01:00