-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add async
feature and rework Dispatcher
#9
Conversation
Closes #7 Closes #8 Signed-off-by: Yuki Kishimoto <[email protected]>
* Rename `NtfyError` to `Error` Ref #7 Signed-off-by: Yuki Kishimoto <[email protected]>
This looks good to me. I like the changes to separate the "method" out a bit more. Things that would be nice to add:
|
Yes, good idea. This can be done in another PR
Was already available the #[derive(Debug, Clone)]
pub struct Dispatcher<T = ()> // <-- set a default value for the generic
where
T: Clone,
{
url: Url,
inner: T,
}
// Impl the `builder` method for the `Dispatcher<()>`, allowing to call `Dispatcher::builder`.
impl Dispatcher {
pub fn builder<S>(url: S) -> DispatcherBuilder
where
S: Into<String>,
{
DispatcherBuilder::new(url)
}
} |
I guess first, this pull-request should be completed before that, then I could create that.
I know that there was a function inside the struct implementation before, but what I'm talking about is just putthing the method in the |
Ahh, sure, I'll add this! |
Signed-off-by: Yuki Kishimoto <[email protected]>
As mentioned in #9, I added functionality to provide the dispatcher builder and the `Async`/`Blocking` structs with a custom client/agent builder, so things like the user agent, which is not handled by the dispatcher builder already, can be set beforehand. Closes #10 Signed-off-by: Yuki Kishimoto <[email protected]>
No description provided.