pub struct JunoModule { /* private fields */ }Implementations§
Source§impl JunoModule
impl JunoModule
pub fn default(connection_path: &str) -> Self
pub fn from_unix_socket(socket_path: &str) -> Self
pub fn from_inet_socket(host: &str, port: u16) -> Self
pub fn new(protocol: BaseProtocol, connection: Box<dyn BaseConnection>) -> Self
pub async fn initialize( &mut self, module_id: &str, version: &str, dependencies: HashMap<String, String>, ) -> Result<(), Error>
pub async fn declare_function( &mut self, fn_name: &str, function: fn(HashMap<String, Value>) -> Value, ) -> Result<(), Error>
pub async fn call_function( &mut self, fn_name: &str, args: HashMap<String, Value>, ) -> Result<Value, Error>
pub async fn register_hook( &mut self, hook: &str, callback: fn(Value), ) -> Result<(), Error>
pub async fn trigger_hook(&mut self, hook: &str) -> Result<(), Error>
pub async fn close(&mut self)
Auto Trait Implementations§
impl Freeze for JunoModule
impl !RefUnwindSafe for JunoModule
impl !Send for JunoModule
impl !Sync for JunoModule
impl Unpin for JunoModule
impl !UnwindSafe for JunoModule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more