pub fn add_function<F, V>(self, name: &str, f: F) -> Self
   where
      V: ffvariants::Method<T>,
      F: ForeignFunction<V>,
   {
      self.add_raw_function(
         name,
         F::parameter_count(),
         FunctionKind::Foreign(f.into_raw_foreign_function()),
      )
   }
/// Adds an instance function to the struct.
///
/// The function must follow the "method" calling convention, in that it accepts `&T` or
/// `&mut T` as its first parameter.
Adds an instance function to the struct.
The function must follow the "method" calling convention, in that it accepts `&T` or
`&mut T` as its first parameter.
Adds an instance function to the struct . The function must follow the " method " calling convention in that it accepts ` &T ` or ` &mut T ` as its first parameter .
pub fn add_function<F, V>(self, name: &str, f: F) -> Self
   where
      V: ffvariants::Method<T>,
      F: ForeignFunction<V>,
   {
      self.add_raw_function(
         name,
         F::parameter_count(),
         FunctionKind::Foreign(f.into_raw_foreign_function()),
      )
   }
pub fn add_function < F , V > ( self , name : & str , f : F ) -> Self where V : ffvariants :: Method < T > , F : ForeignFunction < V > , { self . add_raw_function ( name , F :: parameter_count ( ) , FunctionKind :: Foreign ( f . into_raw_foreign_function ( ) ) , ) }
Adds an instance function to the struct.
Adds an instance function to the struct .
self
name
&str
f
F