pub trait ServerFunctionRegistry<T> {
    type Error: Error;

    // Required methods
    fn register(
        url: &'static str,
        server_function: Arc<ServerFnTraitObj<T>>
    ) -> Result<(), Self::Error>;
    fn get(url: &str) -> Option<Arc<ServerFnTraitObj<T>>>;
    fn paths_registered() -> Vec<&'static str>;
}
Expand description

Something that can register a server function.

Required Associated Types§

source

type Error: Error

An error that can occur when registering a server function.

Required Methods§

source

fn register( url: &'static str, server_function: Arc<ServerFnTraitObj<T>> ) -> Result<(), Self::Error>

Registers a server function at the given URL.

source

fn get(url: &str) -> Option<Arc<ServerFnTraitObj<T>>>

Returns the server function registered at the given URL, or None if no function is registered at that URL.

source

fn paths_registered() -> Vec<&'static str>

Returns a list of all registered server functions.

Implementors§