Trait uniffi::ffi::handle_maps::UniffiMethodCall [−][src]
pub trait UniffiMethodCall<T> { fn method_call_with_result<R, E, F>(
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value
where
F: UnwindSafe + FnOnce(&mut T) -> Result<R, E>,
ExternError: From<E>,
R: IntoFfi; fn method_call_with_output<R, F>(
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value
where
F: UnwindSafe + FnOnce(&mut T) -> R,
R: IntoFfi; }
Expand description
A trait to help the code generation a bit tidier.
We’ll implement it only for the MutexHandleMap
which asks for FnOnce(&mut T)
callbacks, but we’ll give ArcHandleMap
very similar looking methods, that
accept FnOnce(&T)
callbacks.
When generating the code in the to_rs_method_call
macro in macros.rs
, the code will be lexically
identical.
Required methods
fn method_call_with_result<R, E, F>(
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value where
F: UnwindSafe + FnOnce(&mut T) -> Result<R, E>,
ExternError: From<E>,
R: IntoFfi,
[src]
fn method_call_with_result<R, E, F>(
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value where
F: UnwindSafe + FnOnce(&mut T) -> Result<R, E>,
ExternError: From<E>,
R: IntoFfi,
[src]fn method_call_with_output<R, F>(
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value where
F: UnwindSafe + FnOnce(&mut T) -> R,
R: IntoFfi,
[src]
fn method_call_with_output<R, F>(
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value where
F: UnwindSafe + FnOnce(&mut T) -> R,
R: IntoFfi,
[src]Implementors
impl<T> UniffiMethodCall<T> for MutexHandleMap<T>
[src]
impl<T> UniffiMethodCall<T> for MutexHandleMap<T>
[src]fn method_call_with_result<R, E, F>(
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value where
F: UnwindSafe + FnOnce(&mut T) -> Result<R, E>,
ExternError: From<E>,
R: IntoFfi,
[src]
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value where
F: UnwindSafe + FnOnce(&mut T) -> Result<R, E>,
ExternError: From<E>,
R: IntoFfi,
fn method_call_with_output<R, F>(
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value where
F: UnwindSafe + FnOnce(&mut T) -> R,
R: IntoFfi,
[src]
&self,
out_error: &mut ExternError,
h: u64,
callback: F
) -> R::Value where
F: UnwindSafe + FnOnce(&mut T) -> R,
R: IntoFfi,