summaryrefslogtreecommitdiff
path: root/crates/tor-persist/src/slug.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-persist: Add a slug timestamp type.Gabriela Moldovan2024-10-311-0/+2
| | | | | | | | The new `Iso8601TimeSlug` is useful for encoding a timestamp as a `Slug` (i.e. in a filename). This is needed, for example, for #1692, to encode a timestamp as key denotator.
* tor-persist: Explain why colons will never be valid slug chars.Gabriela Moldovan2024-10-231-0/+4
|
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* tor-persist: Reduce nesting in check_syntax().Ian Jackson2024-01-311-6/+4
|
* tor-persist: Reject slugs that contain uppercase characters.Gabriela Moldovan2024-01-311-1/+6
| | | | | | | The `slug` docs say slugs are not allowed to contain uppercase characters, so let's return an error if they do. Part of #1195
* tor-persist: Document that slugs cannot start with '-'.Gabriela Moldovan2024-01-311-1/+1
|
* tor-persist: Make all Slugs non-empty.Gabriela Moldovan2024-01-311-10/+13
| | | | | | | | This also removes a TODO regarding adding a `Nickname` type for representing `HsClientSpecifier` and `HsNickname` (we don't need it if `Slug`s are non-empty). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1931#note_2990227
* tor-persist: Forbid slugs from starting with a hyphen.Gabriela Moldovan2024-01-311-1/+21
|
* tor_persist::slug: Allow hyphens in Slugs.Gabriela Moldovan2024-01-311-2/+3
| | | | | | | | The internal representation of `HsNickname` will soon be `Slug`, and nicknames can contain hyphens, so let's add `-` to the allowed charset. Part of #1092
* slug: Provide BadSlug::EmptySlugNotAllowedIan Jackson2024-01-291-0/+12
|
* Merge branch 'slug2' into 'main'Ian Jackson2024-01-251-0/+19
|\ | | | | | | | | TryIntoSlug See merge request tpo/core/arti!1922
| * slugs: Provide TryIntoSlug, and replace state_dir::Slug with itIan Jackson2024-01-251-0/+19
| |
* | Merge branch 'slug4' into 'main'gabi-2502024-01-251-0/+5
|\ \ | | | | | | | | | | | | slug: Implement the AsRefs for Slug as well as for SlugRef See merge request tpo/core/arti!1929
| * | slug: Implement the AsRefs for Slug as well as for SlugRefIan Jackson2024-01-251-0/+5
| |/ | | | | | | | | Otherwise you can't use &Slug where someone wants &impl AsRef<Path>, which is rather sad.
* / slug: Fix maint/check_doc_featuresIan Jackson2024-01-251-0/+2
|/
* tor_persist::slug: Abolish ForbiddenOnWindows on non-WindowsIan Jackson2024-01-251-21/+9
| | | | | | | | | Abolish it, sprinkling cfg all over, rather than having it be uninhabited. See https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1912#note_2988746 https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1912#note_2988748
* Introduce tor_persist::slug moduleIan Jackson2024-01-251-0/+396
I need this for state_dir (#1163, !1853). I intend that this should be used for arti paths (#1092, #1193). See also #1195. Implements the spec in #1192 but doesn't connect it to anything yet.