[−][src]Function swipc_gen::generate_ipc
pub fn generate_ipc(
s: &str,
prefix: String,
mod_name: String,
crate_name: String,
is_root_mod: bool
) -> String
Generate a module containing all the functions in the given IPC file.
Strips the prefix from namespace path. The prefix should represents the
location of the module. For instance, if the module is being defined in
libuser::ipc
, then prefix should contain libuser::ipc
. If the file
contains any IPC outside the given prefix, an error will be raised.
The module name and crate name should be specified. This is used to allow
sunrise_libuser to use
itself - since otherwise it will not be in the
namespace.
The generated string will contain a module hierarchy.