mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-17 17:01:52 +00:00
Initial sketch
This commit is contained in:
@ -121,7 +121,6 @@ pub struct CallerContext<'a, E: 'a + UserError> {
|
||||
}
|
||||
|
||||
/// Internal function reference.
|
||||
#[derive(Clone)]
|
||||
pub struct InternalFunctionReference<'a, E: UserError> {
|
||||
/// Module reference.
|
||||
pub module: Arc<ModuleInstanceInterface<E> + 'a>,
|
||||
@ -129,6 +128,16 @@ pub struct InternalFunctionReference<'a, E: UserError> {
|
||||
pub internal_index: u32,
|
||||
}
|
||||
|
||||
// TODO: This impl should be removed once `E` not needed anymore.
|
||||
impl<'a, E> Clone for InternalFunctionReference<'a, E> where E: UserError {
|
||||
fn clone(&self) -> InternalFunctionReference<'a, E> {
|
||||
InternalFunctionReference {
|
||||
module: Arc::clone(&self.module),
|
||||
internal_index: self.internal_index,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, E> fmt::Debug for InternalFunctionReference<'a, E> where E: UserError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "InternalFunctionReference")
|
||||
|
Reference in New Issue
Block a user