88use crate :: builtin:: { GString , NodePath , StringName , Variant } ;
99use crate :: meta:: sealed:: Sealed ;
1010use crate :: meta:: traits:: { GodotFfiVariant , GodotNullableFfi } ;
11- use crate :: meta:: { CowArg , FfiArg , GodotType , ObjectArg , ToGodot } ;
11+ use crate :: meta:: { CowArg , EngineToGodot , FfiArg , GodotType , ObjectArg , ToGodot } ;
1212use crate :: obj:: { DynGd , Gd , GodotClass , Inherits } ;
1313
1414/// Implicit conversions for arguments passed to Godot APIs.
@@ -595,21 +595,21 @@ pub trait ArgPassing: Sealed {
595595 #[ doc( hidden) ]
596596 fn ref_to_owned_via < T > ( value : & T ) -> T :: Via
597597 where
598- T : ToGodot < Pass = Self > ,
598+ T : EngineToGodot < Pass = Self > ,
599599 T :: Via : Clone ;
600600
601601 /// Convert to FFI repr in the most efficient way (move or borrow).
602602 #[ doc( hidden) ]
603603 fn ref_to_ffi < T > ( value : & T ) -> Self :: FfiOutput < ' _ , T :: Via >
604604 where
605- T : ToGodot < Pass = Self > ,
605+ T : EngineToGodot < Pass = Self > ,
606606 T :: Via : GodotType ;
607607
608608 /// Convert to `Variant` in the most efficient way (move or borrow).
609609 #[ doc( hidden) ]
610610 fn ref_to_variant < T > ( value : & T ) -> Variant
611611 where
612- T : ToGodot < Pass = Self > ,
612+ T : EngineToGodot < Pass = Self > ,
613613 {
614614 let ffi_result = Self :: ref_to_ffi ( value) ;
615615 GodotFfiVariant :: ffi_to_variant ( & ffi_result)
@@ -631,19 +631,19 @@ impl ArgPassing for ByValue {
631631
632632 fn ref_to_owned_via < T > ( value : & T ) -> T :: Via
633633 where
634- T : ToGodot < Pass = Self > ,
634+ T : EngineToGodot < Pass = Self > ,
635635 T :: Via : Clone ,
636636 {
637- value. to_godot ( )
637+ value. engine_to_godot ( )
638638 }
639639
640640 fn ref_to_ffi < T > ( value : & T ) -> Self :: FfiOutput < ' _ , T :: Via >
641641 where
642- T : ToGodot < Pass = Self > ,
642+ T : EngineToGodot < Pass = Self > ,
643643 T :: Via : GodotType ,
644644 {
645- // For ByValue: to_godot () returns owned T::Via, move directly to FFI.
646- GodotType :: into_ffi ( value. to_godot ( ) )
645+ // For ByValue: engine_to_godot () returns owned T::Via, move directly to FFI.
646+ GodotType :: into_ffi ( value. engine_to_godot ( ) )
647647 }
648648}
649649
@@ -662,20 +662,20 @@ impl ArgPassing for ByRef {
662662
663663 fn ref_to_owned_via < T > ( value : & T ) -> T :: Via
664664 where
665- T : ToGodot < Pass = Self > ,
665+ T : EngineToGodot < Pass = Self > ,
666666 T :: Via : Clone ,
667667 {
668668 // For ByRef types, clone the reference to get owned value.
669- value. to_godot ( ) . clone ( )
669+ value. engine_to_godot ( ) . clone ( )
670670 }
671671
672672 fn ref_to_ffi < T > ( value : & T ) -> <T :: Via as GodotType >:: ToFfi < ' _ >
673673 where
674- T : ToGodot < Pass = Self > ,
674+ T : EngineToGodot < Pass = Self > ,
675675 T :: Via : GodotType ,
676676 {
677677 // Use by-ref conversion if possible, avoiding unnecessary clones when passing to FFI.
678- GodotType :: to_ffi ( value. to_godot ( ) )
678+ GodotType :: to_ffi ( value. engine_to_godot ( ) )
679679 }
680680}
681681
@@ -696,19 +696,19 @@ impl ArgPassing for ByObject {
696696
697697 fn ref_to_owned_via < T > ( value : & T ) -> T :: Via
698698 where
699- T : ToGodot < Pass = Self > ,
699+ T : EngineToGodot < Pass = Self > ,
700700 T :: Via : Clone ,
701701 {
702702 // For ByObject types, do like ByRef: clone the reference to get owned value.
703- value. to_godot ( ) . clone ( )
703+ value. engine_to_godot ( ) . clone ( )
704704 }
705705
706706 fn ref_to_ffi < T > ( value : & T ) -> ObjectArg < ' _ >
707707 where
708- T : ToGodot < Pass = Self > ,
708+ T : EngineToGodot < Pass = Self > ,
709709 T :: Via : GodotType ,
710710 {
711- let obj_ref: & T :: Via = value. to_godot ( ) ; // implements GodotType.
711+ let obj_ref: & T :: Via = value. engine_to_godot ( ) ; // implements GodotType.
712712 obj_ref. as_object_arg ( )
713713 }
714714}
@@ -745,20 +745,20 @@ where
745745 // return: T::Via = Option<U::Via>
746746 fn ref_to_owned_via < T > ( value : & T ) -> T :: Via
747747 where
748- T : ToGodot < Pass = Self > ,
748+ T : EngineToGodot < Pass = Self > ,
749749 T :: Via : Clone ,
750750 {
751- value. to_godot_owned ( )
751+ value. engine_to_godot_owned ( )
752752 }
753753
754754 fn ref_to_ffi < T > ( value : & T ) -> Self :: FfiOutput < ' _ , T :: Via >
755755 where
756- T : ToGodot < Pass = Self > ,
756+ T : EngineToGodot < Pass = Self > ,
757757 T :: Via : GodotType ,
758758 {
759759 // Reuse pattern from impl GodotType for Option<T>:
760760 // Convert Option<&Via> to Option<Via::ToFfi> and then flatten to Via::ToFfi with null handling.
761- GodotNullableFfi :: flatten_option ( value. to_godot ( ) . map ( |via_ref| via_ref. to_ffi ( ) ) )
761+ GodotNullableFfi :: flatten_option ( value. engine_to_godot ( ) . map ( |via_ref| via_ref. to_ffi ( ) ) )
762762 }
763763}
764764
0 commit comments