Struct autoconnect_ws_sm::UnidentifiedClient
source · pub struct UnidentifiedClient { /* private fields */ }
Expand description
Represents a Client waiting for (or yet to process) a Hello message identifying itself
Implementations§
source§impl UnidentifiedClient
impl UnidentifiedClient
pub fn new(ua: String, app_state: Arc<AppState>) -> Self
sourcepub fn app_settings(&self) -> &Settings
pub fn app_settings(&self) -> &Settings
Return a reference to AppState
’s Settings
sourcepub async fn on_client_msg(
self,
msg: ClientMessage,
) -> Result<(WebPushClient, impl IntoIterator<Item = ServerMessage>), SMError>
pub async fn on_client_msg( self, msg: ClientMessage, ) -> Result<(WebPushClient, impl IntoIterator<Item = ServerMessage>), SMError>
Handle a WebPush ClientMessage
sent from the user agent over the
WebSocket for this user
Anything but a Hello message is rejected as an Error
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnidentifiedClient
impl !RefUnwindSafe for UnidentifiedClient
impl Send for UnidentifiedClient
impl Sync for UnidentifiedClient
impl Unpin for UnidentifiedClient
impl !UnwindSafe for UnidentifiedClient
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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