fn builtin_ffi_definitions()

in uniffi_bindgen/src/interface/mod.rs [648:693]


    fn builtin_ffi_definitions(&self) -> impl IntoIterator<Item = FfiDefinition> + '_ {
        [
            FfiCallbackFunction {
                name: "RustFutureContinuationCallback".to_owned(),
                arguments: vec![
                    FfiArgument::new("data", FfiType::UInt64),
                    FfiArgument::new("poll_result", FfiType::Int8),
                ],
                return_type: None,
                has_rust_call_status_arg: false,
            }
            .into(),
            FfiCallbackFunction {
                name: "ForeignFutureFree".to_owned(),
                arguments: vec![FfiArgument::new("handle", FfiType::UInt64)],
                return_type: None,
                has_rust_call_status_arg: false,
            }
            .into(),
            FfiCallbackFunction {
                name: "CallbackInterfaceFree".to_owned(),
                arguments: vec![FfiArgument::new("handle", FfiType::UInt64)],
                return_type: None,
                has_rust_call_status_arg: false,
            }
            .into(),
            FfiStruct {
                name: "ForeignFuture".to_owned(),
                fields: vec![
                    FfiField::new("handle", FfiType::UInt64),
                    FfiField::new("free", FfiType::Callback("ForeignFutureFree".to_owned())),
                ],
            }
            .into(),
        ]
        .into_iter()
        .chain(
            self.all_possible_return_ffi_types()
                .flat_map(|return_type| {
                    [
                        callbacks::foreign_future_ffi_result_struct(return_type.clone()).into(),
                        callbacks::ffi_foreign_future_complete(return_type).into(),
                    ]
                }),
        )
    }