summaryrefslogtreecommitdiff
path: root/crates/tor-checkable
Commit message (Collapse)AuthorAgeFilesLines
* Bump versions for tor-* and arti-* cratesSteven Engler2026-08-031-3/+3
| | | | | | | ```bash readarray -t bump < <(maint/list-crates | grep -P '^tor-|^arti-') for crate in "${bump[@]}"; do cargo set-version --bump minor -p "${crate}"; done ```
* tor-checkable: Fix a wrong ref in semver.mdIan Jackson2026-07-231-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4223#note_3438344
* tor-checkable: Improve/fix a commentIan Jackson2026-07-231-1/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4223#note_3438341
* tor-checkable: Fix punctuation in commentIan Jackson2026-07-231-1/+1
|
* tor-checkable: Fix a doc comment copypastaIan Jackson2026-07-231-1/+1
|
* tor-checkable: Fix two doc comments start/endIan Jackson2026-07-231-2/+2
|
* tor-checkable: TimeBound: Provide new build_intersect APIIan Jackson2026-07-233-1/+141
|
* clippy config: Forbid TimeRangeBound::if_valid_nowIan Jackson2026-07-232-4/+8
|
* tor-checkable: Rename `TimeBound::is_valid_at` to `check_valid_at`Ian Jackson2026-07-233-20/+21
| | | | | I find this names confusing. To my mind "is" implies a function returning `bool`.
* tor-checkable: Rename `TimeBound::check_valid_*` to `if_valid_*`Ian Jackson2026-07-233-12/+14
| | | | | | | I find these names confusing. To my mind "check" implies a function returning `Result<(), _>`. Some other APIs use `unwrap` here but I think `if` is good.
* tor-checkable: Deprecate `TimeBound::check_valid_at_opt`Ian Jackson2026-07-233-8/+19
|
* tor-checkable: TimeBound: Make wrapped type an associated type (fmt)Ian Jackson2026-07-231-1/+4
|
* tor-checkable: TimeBound: Make wrapped type an associated typeIan Jackson2026-07-233-6/+12
| | | | | It wouldn't make much sense for one concrete type to be unwrappable variously as different inner types.
* tor-checkable: TimeBound: Make dangerously_into_parts return TimeRange (fmt)Ian Jackson2026-07-231-3/+1
|
* tor-checkable: TimeBound: Make dangerously_into_parts return TimeRangeIan Jackson2026-07-231-4/+4
| | | | | It is better to return a more cooked type. `TimeRange` aka `TimeRangeBound<()>` is perfect for this.
* tor-checkable: TimeBound: Make is_valid_at a provided methodIan Jackson2026-07-232-1/+10
| | | | | | | | | | | Now that we have `bounds()`, we can centralise this implementation and delete the implementations. I don't think it's necessary to provide an engineered safeguard against downstreams overriding this method. Any existing implementors of this trait will break because they must provide `.bounds()` now, which is an opportunity to notice that the `is_valid_at` can be deleted. But, if it is not deleted, nothing goes wrong.
* tor-checkable: TimeBound: remove Error associated typeIan Jackson2026-07-233-12/+7
| | | | | This was always TimeValidityError. And we want to rely on that so we can do the validity checking more centrally.
* tor-checkable: TimeBound: Add bounds accessorIan Jackson2026-07-233-16/+24
| | | | | | | This makes a `TimeBound` much more convenient to work with, will allow more centralisation. This replaces temporary `bound` inherent method on `TimeRangeBound`.
* tor-checkable: TimeRange: Provide intersect_bounds methodIan Jackson2026-07-233-1/+54
|
* tor-checkable: TimeRange: Provide a more complete APIIan Jackson2026-07-232-0/+59
| | | | | This is our time range type, so it wants a bunch of useful methods and conversions.
* tor-checkable: Introduce TimeRange aliasIan Jackson2026-07-233-1/+10
|
* tor-checkable: TimeRangeBound: Rename extend_tolerance to extend_end_boundIan Jackson2026-07-232-4/+10
| | | | | | | | | It was confusing that one of these functions had "which bound" mentioned in its name, but the other didn't. So add `end` and switch from `tolerance` to `bound` (see previous commit message). *This* commit should deal only in `extend_tolerance` and `end` and shouldn't touch `extend_start_bound` or `extend_pre_tolerance`.
* tor-checkable: TimeRangeBound: Rename extend_pre_tolerance to extend_start_boundIan Jackson2026-07-232-3/+13
| | | | | | | | | | | | | | Although it is often used to apply a tolerance, it doesn't make sense to say that this is extending the "tolerance" of a `TimeRangeBound`. A `TimeRangeBound` doesn't have a tolerance, only bounds. Also we should be consistent in our terminology, and use `start` rather than `pre`. We'll rename the other method too. Doing them one at a time will makes it easier to spot any "pre/start" vs "<nothing>/end" slips: *this* commit should deal only in `pre` and `start` and shouldn't touch `extend_tolerance`.
* tor-checkable: TimeRangeBound: Swap code order of two functionsIan Jackson2026-07-231-10/+10
| | | | | This puts the start bounds extension function before the end one. That makes sense because starts are before ends.
* tor-checkable: TimeRangeBound: Rename bounds to bounds_start_endIan Jackson2026-07-231-2/+14
| | | | | | | | | | This just returns a tuple. We're going to introduce a new method that returns a `TimeRagne` and will want to be called `bounds`. That method will want to be in the `TimeBound` trait, but for now we add it here. Various call sites will be added in forthcoming commits.
* tor-checkable: Cargo.toml: Add some blank linesIan Jackson2026-07-231-0/+2
| | | | I find this hard to read without them.
* tor-checkable: TimeRangeBound: document lack of well-formedness invariantIan Jackson2026-07-231-0/+3
|
* tor-checkable: Re-export TimeRangeBound at the top-levelIan Jackson2026-07-232-0/+3
| | | | | | This module has only few public items - currently, only one. And it has the word "time" in it. It doesn't make sense to expect callers to write `timed::`.
* tor-checkable: import time::Duration for brevityIan Jackson2026-07-231-3/+3
| | | | | I noticed this clumsiness while passing. We can't do the same for SystemTime because we have the wasm SystemTime thing too :-/.
* Apply deferred rustfmt churnIan Jackson2026-07-161-1/+1
|
* Use new TimeRangeBound name throughout the treeIan Jackson2026-07-161-29/+29
|
* tor-checkable: Rename TimerangeBound to TimeRangeBoundIan Jackson2026-07-162-5/+10
| | | | For consistency with the TimeBound trait.
* Use new TimeBound name throughout the treeIan Jackson2026-07-162-8/+8
|
* tor-checkable: Rename Timebound to TimeBoundIan Jackson2026-07-162-3/+7
| | | | For consistency with TimeRangeBounds (currently TimerangeBounds).
* add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
|
* Removed unnecessary lintpryty262026-07-151-1/+1
| | | | Removed unnecessary lint
* Version bumps for 2.5.0Nick Mathewson2026-06-301-3/+3
| | | | | | | | | | | | | Closes #2617. We've lucked out this time, and it turns out that every one of our published crates gets a minor bump. So this was generated with: ``` for cr in $(./maint/list-crates); do cargo set-version -p $cr --bump minor done ```
* tor-checkable: TODO for TimerangeBound from TimeboundClara Engler2026-06-231-0/+4
|
* Bump MSRV to 1.91Clara Engler2026-06-151-1/+1
| | | | | | | | | | | | | | | | | | | This commit bumps the MSRV to 1.91 which was released on 2025-10-30. The Cargo.toml files were updated as follows: ```sh git ls-files | \ grep ".*Cargo\.toml$" | \ xargs sed -i '' 's/^rust-version = "1\.89"$/rust-version = "1\.91"/g' ``` The following files were updated manually: ``` modified: .gitlab-ci.yml modified: README.md modified: flake.nix modified: maint/docker-android/Dockerfile ```
* tor-checkable: Specify Timebound inclusiveness in rustdocClara Engler2026-06-111-0/+5
| | | | | This commit updates Timebound's rustdoc to require inclusiveness when checking the timeliness of a given object.
* tor-checkable: TimerangeBound: test edge casesIan Jackson2026-06-101-0/+10
|
* tor-checkable: TimeRangebound: document inclusivityIan Jackson2026-06-101-1/+2
|
* tor-checkable: TimerangeBound: is_valid: Treat bounds as inclusive (fmt)Ian Jackson2026-06-101-2/+6
|
* tor-checkable: TimerangeBound: is_valid: Treat bounds as inclusiveIan Jackson2026-06-101-2/+2
| | | | | | | | | | | | | | | This makes more sense because: * `start_bound` and `end_bound` return `Bound::Included` * It doesn't make sense to say that a document isn't valid at the very start of its validity period. (And we don't want a half-open range.) * NotYetValid(0ns) and Expired(0ns) are rather nonsensical errors. In real timeliness tests it will make no difference since the current time is only equal to the bound for a nanosecond. But tests that like to test corner cases might be affected, and possibly some synthetic situations (where the document's own validity time start is used somehow) might change.
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-093-0/+3
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Bump all the unstable tor- and arti- crates to 0.43.0Gabriela Moldovan2026-06-011-2/+2
| | | | | | | | | | Done using: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.43.0 done ```
* release: Bump tor- and arti- crate versions.Wesley Aptekar-Cassels2026-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p arti-client 0.42.0 cargo set-version -p arti-config 0.42.0 cargo set-version -p arti-relay 0.42.0 cargo set-version -p arti-rpc-client-core 0.42.0 cargo set-version -p arti-rpcserver 0.42.0 cargo set-version -p arti-testing 0.42.0 cargo set-version -p arti-ureq 0.42.0 cargo set-version -p tor-async-utils 0.42.0 cargo set-version -p tor-basic-utils 0.42.0 cargo set-version -p tor-bytes 0.42.0 cargo set-version -p tor-cell 0.42.0 cargo set-version -p tor-cert 0.42.0 cargo set-version -p tor-cert-x509 0.42.0 cargo set-version -p tor-chanmgr 0.42.0 cargo set-version -p tor-checkable 0.42.0 cargo set-version -p tor-circmgr 0.42.0 cargo set-version -p tor-config 0.42.0 cargo set-version -p tor-config-path 0.42.0 cargo set-version -p tor-consdiff 0.42.0 cargo set-version -p tor-dirclient 0.42.0 cargo set-version -p tor-dircommon 0.42.0 cargo set-version -p tor-dirmgr 0.42.0 cargo set-version -p tor-dirserver 0.42.0 cargo set-version -p tor-error 0.42.0 cargo set-version -p tor-events 0.42.0 cargo set-version -p tor-general-addr 0.42.0 cargo set-version -p tor-geoip 0.42.0 cargo set-version -p tor-guardmgr 0.42.0 cargo set-version -p tor-hsclient 0.42.0 cargo set-version -p tor-hscrypto 0.42.0 cargo set-version -p tor-hsrproxy 0.42.0 cargo set-version -p tor-hsservice 0.42.0 cargo set-version -p tor-key-forge 0.42.0 cargo set-version -p tor-keymgr 0.42.0 cargo set-version -p tor-linkspec 0.42.0 cargo set-version -p tor-llcrypto 0.42.0 cargo set-version -p tor-log-ratelim 0.42.0 cargo set-version -p tor-memquota 0.42.0 cargo set-version -p tor-memquota-cost 0.42.0 cargo set-version -p tor-netdir 0.42.0 cargo set-version -p tor-netdoc 0.42.0 cargo set-version -p tor-persist 0.42.0 cargo set-version -p tor-proto 0.42.0 cargo set-version -p tor-protover 0.42.0 cargo set-version -p tor-ptmgr 0.42.0 cargo set-version -p tor-relay-crypto 0.42.0 cargo set-version -p tor-relay-selection 0.42.0 cargo set-version -p tor-rpcbase 0.42.0 cargo set-version -p tor-rpc-connect 0.42.0 cargo set-version -p tor-rtcompat 0.42.0 cargo set-version -p tor-rtmock 0.42.0 cargo set-version -p tor-socksproto 0.42.0 cargo set-version -p tor-units 0.42.0
* Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with nailing-cargo -Eu set-version -p arti-client 0.41.0 nailing-cargo -Eu set-version -p arti-relay 0.41.0 nailing-cargo -Eu set-version -p arti-rpcserver 0.41.0 nailing-cargo -Eu set-version -p arti-ureq 0.41.0 nailing-cargo -Eu set-version -p arti-rpc-client-core 0.41.0 nailing-cargo -Eu set-version -p tor-basic-utils 0.41.0 nailing-cargo -Eu set-version -p tor-error 0.41.0 nailing-cargo -Eu set-version -p tor-general-addr 0.41.0 nailing-cargo -Eu set-version -p tor-geoip 0.41.0 nailing-cargo -Eu set-version -p tor-memquota-cost 0.41.0 nailing-cargo -Eu set-version -p tor-llcrypto 0.41.0 nailing-cargo -Eu set-version -p tor-cert-x509 0.41.0 nailing-cargo -Eu set-version -p tor-rtcompat 0.41.0 nailing-cargo -Eu set-version -p tor-rtmock 0.41.0 nailing-cargo -Eu set-version -p tor-async-utils 0.41.0 nailing-cargo -Eu set-version -p tor-config 0.41.0 nailing-cargo -Eu set-version -p tor-config-path 0.41.0 nailing-cargo -Eu set-version -p tor-rpc-connect 0.41.0 nailing-cargo -Eu set-version -p tor-log-ratelim 0.41.0 nailing-cargo -Eu set-version -p tor-rpcbase 0.41.0 nailing-cargo -Eu set-version -p tor-memquota 0.41.0 nailing-cargo -Eu set-version -p tor-units 0.41.0 nailing-cargo -Eu set-version -p tor-bytes 0.41.0 nailing-cargo -Eu set-version -p tor-protover 0.41.0 nailing-cargo -Eu set-version -p tor-checkable 0.41.0 nailing-cargo -Eu set-version -p tor-cert 0.41.0 nailing-cargo -Eu set-version -p tor-key-forge 0.41.0 nailing-cargo -Eu set-version -p tor-hscrypto 0.41.0 nailing-cargo -Eu set-version -p tor-socksproto 0.41.0 nailing-cargo -Eu set-version -p tor-linkspec 0.41.0 nailing-cargo -Eu set-version -p tor-cell 0.41.0 nailing-cargo -Eu set-version -p tor-persist 0.41.0 nailing-cargo -Eu set-version -p tor-keymgr 0.41.0 nailing-cargo -Eu set-version -p tor-relay-crypto 0.41.0 nailing-cargo -Eu set-version -p tor-proto 0.41.0 nailing-cargo -Eu set-version -p tor-netdoc 0.41.0 nailing-cargo -Eu set-version -p tor-consdiff 0.41.0 nailing-cargo -Eu set-version -p tor-netdir 0.41.0 nailing-cargo -Eu set-version -p tor-relay-selection 0.41.0 nailing-cargo -Eu set-version -p tor-chanmgr 0.41.0 nailing-cargo -Eu set-version -p tor-ptmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dircommon 0.41.0 nailing-cargo -Eu set-version -p tor-guardmgr 0.41.0 nailing-cargo -Eu set-version -p tor-circmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirclient 0.41.0 nailing-cargo -Eu set-version -p tor-dirmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirserver 0.41.0 nailing-cargo -Eu set-version -p tor-hsclient 0.41.0 nailing-cargo -Eu set-version -p tor-hsservice 0.41.0 nailing-cargo -Eu set-version -p tor-hsrproxy 0.41.0
* Run cargo sort --workspace and commit the parts we wantIan Jackson2026-03-301-1/+1
|
* Plumb web-time-compat/full dependency through everywhere.Ian Jackson2026-03-301-1/+1
| | | | As generated by maint/fixup-features.