pub trait WsMount {
// Required methods
fn ws_mount_methods() -> Vec<String>;
fn ws_mount_dispatch(
&self,
method: &str,
params: Value,
) -> Result<Value, String>;
fn ws_mount_dispatch_async(
&self,
method: &str,
params: Value,
) -> impl Future<Output = Result<Value, String>> + Send;
}Expand description
Trait for types that can be mounted as WebSocket method namespaces.
Implemented automatically by #[ws] on an impl block. Allows nested
composition: a parent WebSocket server can mount a child’s methods with a dot-separated prefix.
Required Methods§
Sourcefn ws_mount_methods() -> Vec<String>
fn ws_mount_methods() -> Vec<String>
Get method names for this mount (without prefix).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.