market's Issues
Change ConsumeError and ProduceError into ConsumeFailure and ProduceFailure
These are returned when consume()
and produce()
" fail to perform their functionality, even though there may be no error (such the the stock is empty).
Add constructor for ProduceGoodError
Look into threads that return a Result
Once specialization is stabilized, deprecate Blame and TryBlame
Once specialization has been stabilized, deprecate Blame and TryBlame in favor of From and TryFrom with bounds.
Current:
impl<F: Flaws, W: Flaws> Blame<Fault<W> for Fault<F>
where
W::Insufficiency: From<F::Insufficiency>,
W::Defect: From<F::Defect>,
Eventual:
impl<F: Flaws, W: Flaws> From<Fault<W> for Fault<F>
where
F::Insufficiency: From<W::Insufficiency>,
F::Defect: From<W::Defect>,
Add Assembler and Disassembler that convert between u8's and goods
create_assembly_line()
shall create PartsInput: Producer<Good = u8>
and Assembler: Consumer<Good = G>
create_disassembly_line()
shall create GoodsInput: Producer<Good = G>
and Disassembler: Consumer<Good = u8>
Unable to implement From<I> and From<D> for FaultConversionError since they conflict with one another
Review consume_all functionality
Do we want to ignore an error if some goods were consumed?
Details should be explained in documentation.
Allow for a Producer to not have an item
Allow for calling produce()
with no good provided. Example use case can be found in sync::Trigger
Once ! is stable, implement Flaws for it
Make Consumer and Producer not rely on having a finite stock.
Currently, Consumer and Producer assume their market is finite and thus having an empty or full stock is a possible error. However, there are some implementations which have an infinite or never empty stock and thus it would be nice if their interface indicated this. Ex: have consume return Self::Error
instead of ConsumeError<Self::Error>
.
Instead of having a struct for each channel kind, should have a generic struct that can create any kind of channel
Move all implementations into separate crate
Possible new crate name markets
?
Add browse function to Consumer that functions like peek for Iterator
Add demand_for/until and force_for/until
Each function will be gated by a new time
feature.
_until
will take atime::OffsetDateTime
that indicates when the block will be released. It will block until the action is successful or the current time is greater than the given time._for
will take atime::Duration
that indicates how long the block will occur. It will calculate thetime::OffsetDateTime
and call_until
Review if ProduceError should also include a FailedInspection variant
Make consumer_fault! and producer_fault! derive macros
Should probably rename to ConsumeFault
and ProduceFault
.
If this is done, then we can likely revert the mod order in lib.rs
Cleanup StripFrom and ComposeFrom
Possibly these should be in a separate crate
Replace returning a Result in trait methods with throws macro
Blocked by fehler issue 39
Add tests
Add Producer::offer() that returns a good if it is not produced
This generally would require Self::Good: Clone
but there are some cases, such as Writer
where this should be overridden.
Remove crate:: from paths in favor of use crate::module
Remove map_fault() from ConsumeFailure and ProduceFailure
Should be replaced by impl<T: From<F>> From<ConsumeFailure<F>> for ConsumeFailure<T>
.
Blocked by stabilization of specialization.
Derive thiserror::Error for ConsumeFailure
Blocked by thiserror PR 107
Add async functionality
Allow for Consumer and Producer that will not fail
Example use case for Producer
can be found in sync::Trigger
Add From<T> for ConsumeFailure<T> and ProduceFailure<T>
Blocked by stabilization of specialization
Once specialization is stabilized, remove map_fault() from Fault and Failure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.