Update wry version to 0.50.1 (#3810)
Signed-off-by: SmileSky <mzdk100@foxmail.com>
This commit is contained in:
1 parent
7c2cea9df7
commit
91a218039e
5 files changed
+48
-52
No files matched your search
@@ -70,12 +70,12 @@ impl LaunchConfig for Config {}
|
||||
|
||||
pub(crate) type WryProtocol = (
|
||||
String,
|
||||
Box<dyn Fn(HttpRequest<Vec<u8>>) -> HttpResponse<Cow<'static, [u8]>> + 'static>,
|
||||
Box<dyn Fn(&str, HttpRequest<Vec<u8>>) -> HttpResponse<Cow<'static, [u8]>> + 'static>,
|
||||
);
|
||||
|
||||
pub(crate) type AsyncWryProtocol = (
|
||||
String,
|
||||
Box<dyn Fn(HttpRequest<Vec<u8>>, RequestAsyncResponder) + 'static>,
|
||||
Box<dyn Fn(&str, HttpRequest<Vec<u8>>, RequestAsyncResponder) + 'static>,
|
||||
);
|
||||
|
||||
impl Config {
|
||||
@@ -188,7 +188,7 @@ impl Config {
|
||||
/// Set a custom protocol
|
||||
pub fn with_custom_protocol<F>(mut self, name: impl ToString, handler: F) -> Self
|
||||
where
|
||||
F: Fn(HttpRequest<Vec<u8>>) -> HttpResponse<Cow<'static, [u8]>> + 'static,
|
||||
F: Fn(&str, HttpRequest<Vec<u8>>) -> HttpResponse<Cow<'static, [u8]>> + 'static,
|
||||
{
|
||||
self.protocols.push((name.to_string(), Box::new(handler)));
|
||||
self
|
||||
@@ -222,7 +222,7 @@ impl Config {
|
||||
/// See [`wry`](wry::WebViewBuilder::with_asynchronous_custom_protocol) for more details on implementation
|
||||
pub fn with_asynchronous_custom_protocol<F>(mut self, name: impl ToString, handler: F) -> Self
|
||||
where
|
||||
F: Fn(HttpRequest<Vec<u8>>, RequestAsyncResponder) + 'static,
|
||||
F: Fn(&str, HttpRequest<Vec<u8>>, RequestAsyncResponder) + 'static,
|
||||
{
|
||||
self.asynchronous_protocols
|
||||
.push((name.to_string(), Box::new(handler)));
|
||||
|
||||
Reference in new issue
Block a user