Lines Matching refs:Resource

405     let dtor = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "dtor")?;  in drop_host_twice()
407 let t = Resource::new_own(100); in drop_host_twice()
478 let t1_pass = i.get_typed_func::<(Resource<MyType>,), (ResourceAny,)>(&mut store, "t1-pass")?; in manually_destroy()
481 let t1 = Resource::new_own(100); in manually_destroy()
592 let a_typed = i.get_typed_func::<(Resource<MyType>,), (ResourceAny,)>(&mut store, "a")?; in dynamic_val()
594 i.get_typed_func::<(Resource<MyType>,), (Resource<MyType>,)>(&mut store, "a")?; in dynamic_val()
598 let t1 = Resource::new_own(100); in dynamic_val()
603 a.call(&mut store, &[Val::Resource(t1)], &mut results)?; in dynamic_val()
605 Val::Resource(resource) => { in dynamic_val()
620 let t1_any = Resource::<MyType>::new_own(100).try_into_resource_any(&mut store)?; in dynamic_val()
622 a.call(&mut store, &[Val::Resource(t1_any)], &mut results)?; in dynamic_val()
624 Val::Resource(resource) => { in dynamic_val()
639 let t1 = Resource::<MyType>::new_own(100) in dynamic_val()
651 a.call(&mut store, &[Val::Resource(t1_any)], &mut results)?; in dynamic_val()
653 Val::Resource(resource) => { in dynamic_val()
670 Val::Resource(resource) => { in dynamic_val()
766 let f = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f")?; in active_borrows_at_end_of_call()
768 let resource = Resource::new_own(1); in active_borrows_at_end_of_call()
822 .func_wrap("f", |_cx, (r,): (Resource<MyType>,)| { in thread_through_borrow()
829 let f = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f2")?; in thread_through_borrow()
831 let resource = Resource::new_own(100); in thread_through_borrow()
870 let f = i.get_typed_func::<(&Resource<MyType>,), (Resource<MyType>,)>(&mut store, "f")?; in borrows_must_be_dropped_before_lifting()
872 let resource = Resource::new_own(100); in borrows_must_be_dropped_before_lifting()
920 .func_wrap("f", |_, _: (Resource<MyType>,)| Ok(()))?; in cannot_use_borrow_for_own()
923 let f = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f")?; in cannot_use_borrow_for_own()
925 let resource = Resource::new_own(100); in cannot_use_borrow_for_own()
974 let f_typed = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f")?; in can_use_own_for_borrow()
976 let resource = Resource::new_own(100); in can_use_own_for_borrow()
979 let resource = Resource::new_borrow(200); in can_use_own_for_borrow()
982 let resource = Resource::<MyType>::new_own(300).try_into_resource_any(&mut store)?; in can_use_own_for_borrow()
983 f.call(&mut store, &[Val::Resource(resource)], &mut [])?; in can_use_own_for_borrow()
1034 .func_wrap("f", |_cx, (r,): (Resource<MyType>,)| Ok((r,)))?; in passthrough_wrong_type()
1037 let f = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f2")?; in passthrough_wrong_type()
1039 let resource = Resource::new_own(100); in passthrough_wrong_type()
1076 let f = i.get_typed_func::<(&Resource<MyType>, &Resource<MyType>), ()>(&mut store, "f")?; in pass_moved_resource()
1078 let resource = Resource::new_own(100); in pass_moved_resource()
1115 i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f1") in type_mismatch()
1124 i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f2") in type_mismatch()
1133 i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f3") in type_mismatch()
1224 let f = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f2")?; in host_borrow_as_resource_any()
1226 let resource = Resource::new_own(100); in host_borrow_as_resource_any()
1242 let f = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f2")?; in host_borrow_as_resource_any()
1244 let resource = Resource::new_own(100); in host_borrow_as_resource_any()
1346 let take = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "take")?; in pass_host_borrow_to_guest()
1348 let resource = Resource::new_borrow(100); in pass_host_borrow_to_guest()
1407 Ok((Resource::<MyType>::new_own(300),)) in drop_on_owned_resource()
1411 .func_wrap_concurrent("[method]t.foo", |_cx, (r,): (Resource<MyType>,)| { in drop_on_owned_resource()
1491 |_cx, (r1, r2): (Resource<MyType>, Resource<MyType>)| { in guest_different_host_same()
1500 let f = i.get_typed_func::<(&Resource<MyType>, &Resource<MyType>), ()>(&mut store, "f2")?; in guest_different_host_same()
1507 let resource = Resource::new_own(100); in guest_different_host_same()
1561 let f = i.get_typed_func::<(&Resource<MyType>,), ()>(&mut store, "f")?; in resource_any_to_typed_handles_borrow()
1563 let resource = Resource::new_own(100); in resource_any_to_typed_handles_borrow()
1656 .get_typed_func::<(Resource<T>,), ()>(&mut store, "drop-t") in resource_dynamic_not_static()
1672 instance.get_typed_func::<(Resource<T>,), ()>(&mut store, "drop-t")?; in resource_dynamic_not_static()
1801 let call = i.get_typed_func::<(Resource<u32>,), ()>(&mut store, "call")?; in drop_after_sync_lowered_async_host_function()
1802 let r = Resource::new_borrow(3); in drop_after_sync_lowered_async_host_function()