However, for some reason, the `Serialize/Deserialize` macros don't work
for me, even though they work just fine in the respective tests of
the serge crate. What am I possibly doing wrong ?
Now we use the DefaultDelegate as standin in case there is user-delgate.
That way, we save plenty of complexity as no additional
`if let Some(ref mut dlg) = delegate` is necesary.
Fixes#30
During `begin()`, the delegate receives additional information about the
current call, which can be useful for performance tracking, among
other things.
Fixes#25
* MultiPartReader is using match to handle state, reducing unnecessary
calls to 0 in that regard.
* Fixed seek() calls on readers, assuring they are reset to start each
time the loop is done.
* both media-parameters now use `ReadSeek` streams.
* Use `seek()` to figure out size, simplifying the interface.
Closes#17
* reserve_exact(X) where possible (params, multi-part-reader)
* `if let` used whereever possible to prevent duplicate checks
This increases the possible performance, and makes for more readable,
concise code.
* outer frame of `MultiPartReader` to allow using it in `doit()`
* restructured `doit()` to get content-types right
There is more work to do, as it currently doesn't compile, nor
do we deal with our streams correctly.
But we are on a good way.
Now json errors are handled and delegated with the option to retry,
and all other values are just decoded according to plan.
For now, I brutally unwrap json values assuming this will work, because
it really should work.
This doesn't work yet, as I am unable to unwrap the client properly.
It's a refcell that contains a BorrowMut to a hyper::Client, and
lets just, it's complicated.
Now query params are handled completely, including clash check.
Additionally, there is a new result type which encapsulates everything.
It must be typed to the actual result type though, which can be a
request result
Custom property annotations have been very useful, to steer very special
cases.
It's also good that now there is enough infrastructure to deal with
any amount of additional type parameters.
To avoid an additional type parameter, we will use dynamic dispatch
for the delegate.
Having function overrides at some point seems like an excercise better
left for version 1.1 ;)
With a big but ! The most simple thing to do it was to just add
additional type parameters to the respective method.
Now the type cannot be inferred, which means type-hints must be added.
This should be easy enough, but ... has to be done somehow.
Now we will generate proper resoure methods builder calls to instaniate
the more or less valid method builders.
However, it doesn't compile yet, and the 'to_parts()' method on
resources is still missing.
Now comes the actual work of setting them up.
Additionally, the docs were decluttered to show comments only
were necessary. Now the code path to getting the hub is as concise as
possible.
Including documentation at least on the method builder part. The
great thing is that fully working examples are now included on
every type !
Now more involved part starts ... namely setting up the individual call
method signatures.
This includes docs for the library usage.
It's totally great to be able to paste example code right were it
belongs, and also put the same elsewhere to compose more complex docs.
Previously, they were in an extra, oddly named crate.
Now we just make it a part of our generated codebase.
That way, traits, and common code, shows up as part of the library.
Fair enough.
This also means that the types ar not reusable.
Maybe a mixed-mode can be used if that is desired.
That way, we have a common library to pull in from the main repository,
and a space for testing new code (in a partial implementation).
Next there will be generated object structures.