Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

refactor: Sync and Async Code Re-use #4

Merged
merged 1 commit into from
Jul 9, 2023
Merged

refactor: Sync and Async Code Re-use #4

merged 1 commit into from
Jul 9, 2023

Conversation

LeanderBB
Copy link
Owner

Attempt to abstract sync and async requests by writing an abstraction over the flow of data that encompasses a request. The requests fill out a RequestData instance which then gets used as the source of future transformations.

The login chain is a prime example of this. We define a series of steps that are expressed as a series of sequences which will finally produce the expected outcome.

The Session now produces a Sequence implementation which needs to be driven by a client.

Unfortunately, due to lack of Async Trait support, the async implementation is not as efficient as it could be. Attempt was made to test the code on nightly, but ran into this bug
rust-lang/rust#113108

Attempt to abstract sync and async requests by writing an abstraction
over the flow of data that encompasses a request. The requests fill out
a `RequestData` instance which then gets used as the source of future
transformations.

The login chain is a prime example of this. We define a series of steps
that are expressed as a series of sequences which will finally produce
the expected outcome.

The Session now produces a `Sequence` implementation which needs to be
driven by a client.

Unfortunately, due to lack of Async Trait support, the async
implementation is not as efficient as it could be. Attempt was made to
test the code on nightly, but ran into this bug
rust-lang/rust#113108
@LeanderBB LeanderBB merged commit 69c3721 into main Jul 9, 2023
@LeanderBB LeanderBB deleted the http-chain branch July 9, 2023 16:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant