Skip to content

Commit

Permalink
Verified 1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
a1akris committed Jan 15, 2024
1 parent 5f2aaad commit 7fe6186
Show file tree
Hide file tree
Showing 35 changed files with 2,492 additions and 1,346 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
- **1.0.0:**
- Replace `#[async_trait]` with partially stabilized `async trait` using
RPITIT. Set MSRV to 1.75.
- `PageTurner` doesn't require to return `Vec<PageItem>` anymore. `type
PageItem` is renamed into `type PageItems` and a user can specify a full
return type with it like `type PageItems = HashMap<String, Vec<Object>>`;
- `PagesStream` is now a `Stream` extension trait and not a separate type.
- Add extra `PageItems`, `PageError`, `PageTurnerFuture` type aliases,
rename `PageTurnerOutput` into `TurnedPageResult`.
- Implement more optimal sliding window request scheduling strategy for
`pages_ahead` and `pages_ahead_unordered` streams. Details:
<https://github.com/a1akris/page-turner/issues/2>. `into_pages_ahead` and
`into_pages_ahead_unordered` now require `Clone` explicitly and don't use
`Arc` under the hood.
- Internal refactorings, module restructurings, and a huge simplification
of internal streams implementation. All copy-paste is gone!
- Introduce different page turner flavors with relaxed constraints behind
feature flags for use in singlethreaded environments. `local` doesn't
require anything to be `Send` and `mutable` allows to mutate client
during querying. Bring back `async_trait` version of page turner behind
the `dynamic` feature flag.
- Extra tests that check that everything has correct constraints and is
send/object safe where required.
- README, CHANGELOG and documentation overhauls.

- **0.8.2:**
- Fix typo in docs.

- **0.8.1:**
- Bugfix in internal chunking iterator that yilded empty chunks for
`chunk_size = 1` in previous version. (0.8.0 yanked)

- **0.8.0:**
- Introduce [`RequestAhead`] and [`PageTurner::pages_ahead`],
[`PageTurner::pages_ahead_unordered`] for concurrent page querying

- **0.7.0:**
- Hotfix lifetime bounds in [`PagesStream`] for `T` and `E`. (0.6.0 yanked)

- **0.6.0:**
- Initial public release

22 changes: 17 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[package]
name = "page-turner"
version = "0.8.2"
version = "1.0.0"
authors = ["a1akris <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
rust-version = "1.75"

description = "A generic abstraction of APIs with pagination"
readme = "README.md"
repository = "https://github.com/a1akris/page-turner"
documentation = "https://docs.rs/page-turner"
keywords = ["pagination", "paginated", "api", "pages", "page"]
keywords = ["pagination", "paginated", "pageturner", "pages", "page-turner"]
categories = ["rust-patterns", "asynchronous", "web-programming", "network-programming", "concurrency"]

exclude = [
Expand All @@ -18,9 +19,20 @@ exclude = [

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["mt"]
local = []
mt = []
mutable = ["local"]
dynamic = ["mt", "async-trait"]

[dependencies]
async-trait = "0.1.57"
futures = { version = "0.3.24", default_features = false, features = ["std"] }
async-trait = { version = "0.1.77", optional = true }
futures = { version = "0.3.30", default_features = false, features = ["std"] }

[dev-dependencies]
tokio = { version = "1", features = ["test-util", "macros", "rt"] }
tokio = { version = "1", features = ["test-util", "macros", "rt-multi-thread"] }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
25 changes: 0 additions & 25 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading

0 comments on commit 7fe6186

Please sign in to comment.