Lines Matching refs:Box
197 val: Option<Box<wasmtime_component_val_t>>,
200 impl From<(&String, &Option<Box<Val>>)> for wasmtime_component_valvariant_t {
201 fn from((discriminant, value): (&String, &Option<Box<Val>>)) -> Self { in from()
206 .map(|x| Box::new(wasmtime_component_val_t::from(x.as_ref()))), in from()
211 impl From<&wasmtime_component_valvariant_t> for (String, Option<Box<Val>>) {
215 value.val.as_ref().map(|x| Box::new(Val::from(x.as_ref()))), in from()
224 val: Option<Box<wasmtime_component_val_t>>,
227 impl From<&wasmtime_component_valresult_t> for Result<Option<Box<Val>>, Option<Box<Val>>> {
229 let val = value.val.as_ref().map(|x| Box::new(Val::from(x.as_ref()))); in from()
238 impl From<&Result<Option<Box<Val>>, Option<Box<Val>>>> for wasmtime_component_valresult_t {
239 fn from(value: &Result<Option<Box<Val>>, Option<Box<Val>>>) -> Self { in from()
246 .map(|x| Box::new(wasmtime_component_val_t::from(x.as_ref()))), in from()
272 Option(Option<Box<Self>>),
275 Resource(Box<wasmtime_component_resource_any_t>),
314 Val::Option(x.as_ref().map(|x| Box::new(Val::from(x.as_ref())))) in from()
349 .map(|x| Box::new(wasmtime_component_val_t::from(x.as_ref()))), in from()
355 wasmtime_component_val_t::Resource(Box::new(wasmtime_component_resource_any_t { in from()
369 ) -> Box<wasmtime_component_val_t> { in wasmtime_component_val_new()
370 Box::new(mem::replace(src, wasmtime_component_val_t::default())) in wasmtime_component_val_new()
374 pub extern "C" fn wasmtime_component_val_free(_dst: Option<Box<wasmtime_component_val_t>>) {} in wasmtime_component_val_free()
402 ) -> Box<wasmtime_component_resource_type_t> { in wasmtime_component_resource_any_type()
403 Box::new(wasmtime_component_resource_type_t { in wasmtime_component_resource_any_type()
411 ) -> Box<wasmtime_component_resource_any_t> { in wasmtime_component_resource_any_clone()
412 Box::new(wasmtime_component_resource_any_t { in wasmtime_component_resource_any_clone()
428 ) -> Option<Box<wasmtime_error_t>> { in wasmtime_component_resource_any_drop()
434 _resource: Option<Box<wasmtime_component_resource_any_t>>, in wasmtime_component_resource_any_delete()
461 ) -> Box<wasmtime_component_resource_host_t> { in wasmtime_component_resource_host_new()
462 Box::new(wasmtime_component_resource_host_t { in wasmtime_component_resource_host_new()
474 ) -> Box<wasmtime_component_resource_host_t> { in wasmtime_component_resource_host_clone()
475 Box::new(wasmtime_component_resource_host_t { in wasmtime_component_resource_host_clone()
503 _resource: Option<Box<wasmtime_component_resource_host_t>>, in wasmtime_component_resource_host_delete()
511 ret: &mut MaybeUninit<Box<wasmtime_component_resource_host_t>>, in wasmtime_component_resource_any_to_host()
512 ) -> Option<Box<wasmtime_error_t>> { in wasmtime_component_resource_any_to_host()
516 ret.write(Box::new(wasmtime_component_resource_host_t { resource })); in wasmtime_component_resource_any_to_host()
525 ret: &mut MaybeUninit<Box<wasmtime_component_resource_any_t>>, in wasmtime_component_resource_host_to_any()
526 ) -> Option<Box<wasmtime_error_t>> { in wasmtime_component_resource_host_to_any()
530 ret.write(Box::new(wasmtime_component_resource_any_t { resource })); in wasmtime_component_resource_host_to_any()