Bump default-struct-builder to fix unboxing issues

This commit is contained in:
Jens Krause 2023-07-13 07:33:26 +02:00
parent 2c62c85801
commit 7ce480e9ad
2 changed files with 6 additions and 11 deletions

View file

@ -16,7 +16,7 @@ homepage = "https://leptos-use.rs"
leptos = "0.4"
wasm-bindgen = "0.2"
js-sys = "0.3"
default-struct-builder = "0.3"
default-struct-builder = "0.4"
num = { version = "0.4", optional = true }
serde = { version = "1", optional = true }
serde_json = { version = "1", optional = true }

View file

@ -371,20 +371,15 @@ impl fmt::Display for UseWebSocketReadyState {
#[derive(DefaultBuilder)]
pub struct UseWebSocketOptions {
/// `WebSocket` connect callback.
#[builder(into)]
onopen: Box<dyn CloneableFnMutWithArg<Event>>,
onopen: Box<dyn CloneableFnMutWithArg<Event> + 'static>,
/// `WebSocket` message callback for text.
#[builder(into)]
onmessage: Box<dyn CloneableFnMutWithArg<String>>,
onmessage: Box<dyn CloneableFnMutWithArg<String> + 'static>,
/// `WebSocket` message callback for binary.
#[builder(into)]
onmessage_bytes: Box<dyn CloneableFnMutWithArg<Vec<u8>>>,
onmessage_bytes: Box<dyn CloneableFnMutWithArg<Vec<u8>> + 'static>,
/// `WebSocket` error callback.
#[builder(into)]
onerror: Box<dyn CloneableFnMutWithArg<Event>>,
onerror: Box<dyn CloneableFnMutWithArg<Event> + 'static>,
/// `WebSocket` close callback.
#[builder(into)]
onclose: Box<dyn CloneableFnMutWithArg<CloseEvent>>,
onclose: Box<dyn CloneableFnMutWithArg<CloseEvent> + 'static>,
/// Retry times.
reconnect_limit: Option<u64>,
/// Retry interval(ms).