pub fn add_static<F, V>(self, name: &str, f: F) -> Self
   where
      V: ffvariants::Bare,
      F: ForeignFunction<V>,
   {
      self.add_raw_static(
         name,
         F::parameter_count().map(|x| {
            // Add 1 for the static receiver, which isn't counted into the bare function's
            // signature.
            x + 1
         }),
         FunctionKind::Foreign(f.into_raw_foreign_function()),
      )
   }
/// Adds a static function to the struct.
///
/// The function must follow the "bare" calling convention, in that it doesn't accept a reference
/// to `T` as its first parameter.
Adds a static function to the struct.
The function must follow the "bare" calling convention, in that it doesn't accept a reference
to `T` as its first parameter.
Adds a static function to the struct . The function must follow the " bare " calling convention in that it doesn ' t accept a reference to ` T ` as its first parameter .
pub fn add_static<F, V>(self, name: &str, f: F) -> Self
   where
      V: ffvariants::Bare,
      F: ForeignFunction<V>,
   {
      self.add_raw_static(
         name,
         F::parameter_count().map(|x| {
            // Add 1 for the static receiver, which isn't counted into the bare function's
            // signature.
            x + 1
         }),
         FunctionKind::Foreign(f.into_raw_foreign_function()),
      )
   }
pub fn add_static < F , V > ( self , name : & str , f : F ) -> Self where V : ffvariants :: Bare , F : ForeignFunction < V > , { self . add_raw_static ( name , F :: parameter_count ( ) . map ( | x | { // Add 1 for the static receiver, which isn't counted into the bare function's // signature. x + 1 } ) , FunctionKind :: Foreign ( f . into_raw_foreign_function ( ) ) , ) }
Adds a static function to the struct.
Adds a static function to the struct .
self
name
&str
f
F