pub struct WsServiceEntry {
pub name: &'static str,
pub namespace: &'static str,
pub optional_service: Option<&'static str>,
pub factory: fn() -> Arc<dyn ComposableFunction>,
}Expand description
A #[websocket_service]-annotated websocket handler
(Java @WebSocketService(value, namespace)).
Fields§
§name: &'static strThe service name — the URL becomes /{namespace}/{name}/{token}.
namespace: &'static strJava namespace() default: “ws”.
optional_service: Option<&'static str>Java @OptionalService: a config condition (e.g. "app.env=dev") that
must hold at startup for this websocket service to register; None =
always. Evaluated by crate::util::feature::is_required.
factory: fn() -> Arc<dyn ComposableFunction>One function object per websocket connection.
Trait Implementations§
impl Collect for WsServiceEntry
Auto Trait Implementations§
impl Freeze for WsServiceEntry
impl RefUnwindSafe for WsServiceEntry
impl Send for WsServiceEntry
impl Sync for WsServiceEntry
impl Unpin for WsServiceEntry
impl UnsafeUnpin for WsServiceEntry
impl UnwindSafe for WsServiceEntry
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