Struct savvy_bindgen::SavvyFn
source · pub struct SavvyFn {
pub docs: Vec<String>,
pub attrs: Vec<Attribute>,
pub fn_name: Ident,
pub fn_type: SavvyFnType,
pub args: Vec<SavvyFnArg>,
pub return_type: SavvyFnReturnType,
pub stmts_orig: Vec<Stmt>,
pub stmts_additional: Vec<Stmt>,
}Fields§
§docs: Vec<String>Doc comments
attrs: Vec<Attribute>Attributes except for #[savvy]
fn_name: IdentOriginal function name
fn_type: SavvyFnTypetype path of self in the case of impl function
args: Vec<SavvyFnArg>Function arguments
return_type: SavvyFnReturnTypeReturn type of the function
stmts_orig: Vec<Stmt>Original body of the function
stmts_additional: Vec<Stmt>Additional lines to convert SEXP to the specific types
Implementations§
source§impl SavvyFn
impl SavvyFn
pub fn generate_inner_fn(&self) -> ItemFn
pub fn generate_outer_fn(&self) -> ItemFn
source§impl SavvyFn
impl SavvyFn
pub fn fn_name_inner(&self) -> Ident
pub fn fn_name_outer(&self) -> Ident
pub fn from_fn(orig: &ItemFn) -> Result<Self>
pub fn from_impl_fn( orig: &ImplItemFn, fn_type: SavvyFnType, self_ty: &Type ) -> Result<Self>
pub fn new( attrs: &[Attribute], sig: &Signature, block: &Block, fn_type: SavvyFnType, self_ty: Option<&Type> ) -> Result<Self>
Auto Trait Implementations§
impl Freeze for SavvyFn
impl RefUnwindSafe for SavvyFn
impl !Send for SavvyFn
impl !Sync for SavvyFn
impl Unpin for SavvyFn
impl UnwindSafe for SavvyFn
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more