summaryrefslogtreecommitdiff
path: root/src/error.rs
Commit message (Collapse)AuthorAge
* Define ID types as specializations, rather than newtypes.Owen Jacobson2025-07-24
| | | | | | | | | | | | | | | | This is based heavily on the work done for normalized strings, in `crate::normalize`. The key realization in that module is that the logic distinguishing one kind of thing (normalized strings in that case, IDs, in this case) can be packaged up as a type token, and that doing so may reduce the overall complexity. This implementation for ID also borrows heavily from the implementation for normalized strings. It's less flexible: an ID implemented this way can't expose _less_ of `crate::id::ID`'s interface, whereas newtype wrappers can, for example. However, our code doesn't use that flexiblity on purpose anywhere and we're relatively unlikely to change that. In return, the individual ID types require substantially less code - they do not, for example, need to re-implement `Display` for themselves. I very nearly made the trait `Prefix`: ```rust pub trait Prefix { const PREFIX: &str; } ``` however, I think having an effectively-constant method is less surprising overall.
* Rename the project to `pilcrow`.Owen Jacobson2024-11-08
|
* Organizational pass on endpoints and routes.Owen Jacobson2024-10-16
|
* Normalize `not found` errors a bit.Owen Jacobson2024-10-09
|
* Prevent racing between `limit_stream` and logging out.Owen Jacobson2024-10-01
|
* Crank up the Clippy warnings.Owen Jacobson2024-09-25
| | | | This'll catch style issues, mostly.
* rustdoc comment for the (very limited) public API of the crate.Owen Jacobson2024-09-25
| | | | | | | | This silences some `-Wclippy::pedantic` warning, and it's just a good thing to do. I've made the choice to have the docs comment face programmers, and to provide `hi --help` and `hi -h` content via Clap attributes instead of inferring it from the docs comment. Internal (private) "rustdoc" comments have been converted to regular comments until I learn how to write better rustdoc.
* Write tests.Owen Jacobson2024-09-20
|
* Log internal errors (and make it possible to track them down).Owen Jacobson2024-09-18
|
* Make BoxedError an implementation detail of InternalError.Owen Jacobson2024-09-18
|
* Suggested fixes from Clippy, via nursery and pedantic sets.Owen Jacobson2024-09-13
|
* Allow login creation and authentication.Owen Jacobson2024-09-03
This is a beefy change, as it adds a TON of smaller pieces needed to make this all function: * A database migration. * A ton of new crates for things like password validation, timekeeping, and HTML generation. * A first cut at a module structure for routes, templates, repositories. * A family of ID types, for identifying various kinds of domain thing. * AppError, which _doesn't_ implement Error but can be sent to clients.