Function is_valid_rpc_identifier

Source
pub(crate) fn is_valid_rpc_identifier(
    recognized_namespaces: Option<&HashSet<&str>>,
    method: &str,
) -> Result<(), InvalidRpcIdentifier>
Expand description

Check whether method is an expected and well-formed RPC identifier.

If recognized_namespaces is provided, only identifiers within those namespaces are accepted; otherwise, all namespaces are accepted.

(Examples of RPC identifiers are method names.)