File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,27 @@ impl TypeBuilder {
101101 self
102102 }
103103
104+ pub fn set_child_type < ' a , T : Into < Conf < & ' a Type > > > ( & self , ty : T ) -> & Self {
105+ let mut type_with_confidence = Conf :: < & Type > :: into_raw ( ty. into ( ) ) ;
106+ unsafe { BNTypeBuilderSetChildType ( self . handle , & mut type_with_confidence) } ;
107+ self
108+ }
109+
110+ /// This is an alias for [`Self::set_child_type`].
111+ pub fn set_target < ' a , T : Into < Conf < & ' a Type > > > ( & self , ty : T ) -> & Self {
112+ self . set_child_type ( ty)
113+ }
114+
115+ /// This is an alias for [`Self::set_child_type`].
116+ pub fn set_element_type < ' a , T : Into < Conf < & ' a Type > > > ( & self , ty : T ) -> & Self {
117+ self . set_child_type ( ty)
118+ }
119+
120+ /// This is an alias for [`Self::set_child_type`].
121+ pub fn set_return_value < ' a , T : Into < Conf < & ' a Type > > > ( & self , ty : T ) -> & Self {
122+ self . set_child_type ( ty)
123+ }
124+
104125 // Readable properties
105126
106127 pub fn type_class ( & self ) -> TypeClass {
You can’t perform that action at this time.
0 commit comments