summaryrefslogtreecommitdiff
path: root/crates/tor-memquota/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix typosDimitris Apostolou2024-09-031-1/+1
|
* Move stream_peek into tor-async-utilsJim Newsome2024-08-291-2/+0
|
* byte_qty: Move to tor-basic-utilsIan Jackson2024-08-271-1/+0
| | | | Code motion of byte_qty.rs, and minimal necessary supporting changes.
* byte_qty: Move Qty into its own module, byte_qty.Ian Jackson2024-08-271-0/+1
| | | | | | | Code motion, part 1. Also explain in comments at the top of the new module why we are doing this at all rather than using an existing thing.
* tor-memquota: Move the macro-containing modules earlier in the lib.rsIan Jackson2024-08-271-2/+3
| | | | | | This makes more sense than having them alphabetical. Noticed while I was working on moving other code.
* Merge branch 'peekable-poll-set' into 'main'Jim Newsome2024-08-211-1/+2
|\ | | | | | | | | Add and use `PeekableStream` and `UnobtrusivePeekableStream` See merge request tpo/core/arti!2345
| * Expose stream_peekJim Newsome2024-08-211-1/+2
| |
* | tor-memquota: Pass EnabledToken to IsParticipant methodsIan Jackson2024-08-191-0/+1
| | | | | | | | | | | | | | This will hopefully allow much caller code to be compiled out. The users (IsParticipant impls) don't generally need to bother with it - they can just ignore it.
* | tor-memquota: Put EnabledToken in various structs, including the reclaimerIan Jackson2024-08-191-1/+0
| |
* | tor-memquota: Allow memory tracking to be compiled outIan Jackson2024-08-191-0/+2
| | | | | | | | | | | | | | Now if we run doctests without the feature enabled, we test that a no-op MemoryQuotaTracker works. Those tests aren't currently run in CI, but they will be after !2350.
* | tor-memquota: Support a no-op MemoryQuotaTrackerIan Jackson2024-08-191-2/+0
| | | | | | | | | | | | | | | | | | | | Wrap up most of the structures in IfEnabled. Sadly this diff is very noisy. I experimented with macros for the little enabled check at the start of each function but they didn't really help. We don't test this yet. We'll do a smoke test of this later.
* | tor-memquota: Introduce IfEnabled and EnabledTokenIan Jackson2024-08-191-0/+3
|/ | | | EnabledToken is pub because it's going to appear in public APIs.
* tor-memquota: Add mq_queue, memory-quota-tracking (MPSC) queueIan Jackson2024-08-151-0/+1
|
* tor-memquota: Add a Sealed traitIan Jackson2024-08-151-0/+6
| | | | We'll use this in a moment.
* tor-memquota: Provide StreamUnobtrusivePeekerIan Jackson2024-07-241-0/+1
| | | | | | I'm not particularly pleased with this name. We need names for both the type, and the trait we'll almost certainly want to introduce in the future.
* Merge branch 'memquota-typed' into 'main'Ian Jackson2024-07-241-1/+7
|\ | | | | | | | | tor-memquota: HasMemoryCost trait, and type-safe methods See merge request tpo/core/arti!2282
| * tor-memquota: memory_cost: New trait and typed wrappersIan Jackson2024-07-241-0/+2
| |
| * tor-memquota: Add get_used_approx accessorIan Jackson2024-07-241-1/+5
| | | | | | | | | | I just want this for a test right now, bui it seems like it would be good to expose it publicly.
* | tor-memquota: Tidy up a minor formatting glitch in a doc commentIan Jackson2024-07-241-1/+1
|/
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Rename tor-memtrack to tor-memquotaIan Jackson2024-04-291-0/+206