Struct usdpl_back::Instance
source · pub struct Instance { /* private fields */ }Expand description
Back-end instance for interacting with the front-end
Implementations§
source§impl Instance
impl Instance
sourcepub fn register<S: Into<String>, F: Callable + 'static>(
self,
name: S,
f: F
) -> Self
pub fn register<S: Into<String>, F: Callable + 'static>(
self,
name: S,
f: F
) -> Self
Register a thread-safe function which can be invoked by the front-end
sourcepub fn register_blocking<S: Into<String>, F: MutCallable + 'static>(
self,
name: S,
f: F
) -> Self
pub fn register_blocking<S: Into<String>, F: MutCallable + 'static>(
self,
name: S,
f: F
) -> Self
Register a thread-unsafe function which can be invoked by the front-end
sourcepub fn register_async<S: Into<String>, F: AsyncCallable + 'static>(
self,
name: S,
f: F
) -> Self
pub fn register_async<S: Into<String>, F: AsyncCallable + 'static>(
self,
name: S,
f: F
) -> Self
Register a thread-unsafe function which can be invoked by the front-end
sourcepub fn run_blocking(&self) -> Result<(), ()>
pub fn run_blocking(&self) -> Result<(), ()>
Run the web server instance forever, blocking this thread