pub struct ReconnectCallbackStack<S: AppState> {
pub layers: Vec<Box<dyn ReconnectCallback<S>>>,
}Fields§
§layers: Vec<Box<dyn ReconnectCallback<S>>>Implementations§
Source§impl<S: AppState> ReconnectCallbackStack<S>
impl<S: AppState> ReconnectCallbackStack<S>
pub fn add_layer(&mut self, layer: Box<dyn ReconnectCallback<S>>)
Trait Implementations§
Source§impl<S: AppState> Default for ReconnectCallbackStack<S>
impl<S: AppState> Default for ReconnectCallbackStack<S>
Source§impl<S: AppState> ReconnectCallback<S> for ReconnectCallbackStack<S>
impl<S: AppState> ReconnectCallback<S> for ReconnectCallbackStack<S>
Source§fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
state: Arc<S>,
sender: &'life1 AsyncSender<Message>,
) -> Pin<Box<dyn Future<Output = CoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
state: Arc<S>,
sender: &'life1 AsyncSender<Message>,
) -> Pin<Box<dyn Future<Output = CoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The asynchronous function that will be called when a reconnection event occurs.
This function receives the shared state and a sender for outgoing WebSocket messages.
It should return a
CoreResult<()> indicating the success or failure of the operation.
/// # Arguments Read moreAuto Trait Implementations§
impl<S> Freeze for ReconnectCallbackStack<S>
impl<S> !RefUnwindSafe for ReconnectCallbackStack<S>
impl<S> Send for ReconnectCallbackStack<S>
impl<S> Sync for ReconnectCallbackStack<S>
impl<S> Unpin for ReconnectCallbackStack<S>
impl<S> UnsafeUnpin for ReconnectCallbackStack<S>
impl<S> !UnwindSafe for ReconnectCallbackStack<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more