Skip to content

RFC: Future Combinators (CompioFuture) #603

@George-Miao

Description

@George-Miao

Tracking Issue: #629

Add future combinators and FutureExt trait to compose different configurations. This gives the users the ability to furthur customize the not-yet-fired future in a builder manner, and call await on it after configuration:

let token = CancelToken::new();
let personality = /* */;
file.read(buf).with_cancel(&token).with_personality(personality).await;

Data will be passed through Context::ext, which passes an &mut dyn Any to any sub-future within a future.

Metadata

Metadata

Assignees

Labels

RFCRequest for Comment, proposals for features or changesenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions