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" leptos = "0.4"
wasm-bindgen = "0.2" wasm-bindgen = "0.2"
js-sys = "0.3" js-sys = "0.3"
default-struct-builder = "0.3" default-struct-builder = "0.4"
num = { version = "0.4", optional = true } num = { version = "0.4", optional = true }
serde = { version = "1", optional = true } serde = { version = "1", optional = true }
serde_json = { version = "1", optional = true } serde_json = { version = "1", optional = true }

View file

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