pub fn foreach_layer<P: FnMut(&Pipeline, i32) -> i32>(&self, callback: P) {
        //TODO: should replace i32 to bool in callback
        let callback_data: P = callback;
        unsafe extern "C" fn callback_func<P: FnMut(&Pipeline, i32) -> i32>(
            pipeline: *mut ffi::CoglPipeline,
            layer_index: libc::c_int,
            user_data: glib_sys::gpointer,
        ) -> ffi::CoglBool {
            let pipeline = from_glib_borrow(pipeline);
            let callback: *mut P = user_data as *const _ as usize as *mut P;
            (*callback)(&pipeline, layer_index)
        }
        let callback = Some(callback_func::<P> as _);
        let super_callback0: &P = &callback_data;
        unsafe {
            ffi::cogl_pipeline_foreach_layer(
                self.to_glib_none().0,
                callback,
                super_callback0 as *const _ as usize as *mut _,
            );
        }
    }
/// Iterates all the layer indices of the given `self`.
///
/// ## `callback`
/// A `CoglPipelineLayerCallback` to be
///  called for each layer index
/// ## `user_data`
/// Private data that will be passed to the
///  callback
Iterates all the layer indices of the given `self`.
Iterates all the layer indices of the given ` self ` .
pub fn foreach_layer<P: FnMut(&Pipeline, i32) -> i32>(&self, callback: P) {
        //TODO: should replace i32 to bool in callback
        let callback_data: P = callback;
        unsafe extern "C" fn callback_func<P: FnMut(&Pipeline, i32) -> i32>(
            pipeline: *mut ffi::CoglPipeline,
            layer_index: libc::c_int,
            user_data: glib_sys::gpointer,
        ) -> ffi::CoglBool {
            let pipeline = from_glib_borrow(pipeline);
            let callback: *mut P = user_data as *const _ as usize as *mut P;
            (*callback)(&pipeline, layer_index)
        }
        let callback = Some(callback_func::<P> as _);
        let super_callback0: &P = &callback_data;
        unsafe {
            ffi::cogl_pipeline_foreach_layer(
                self.to_glib_none().0,
                callback,
                super_callback0 as *const _ as usize as *mut _,
            );
        }
    }
pub fn foreach_layer < P : FnMut ( & Pipeline , i32 ) -> i32 > ( & self , callback : P ) { //TODO: should replace i32 to bool in callback let callback_data : P = callback ; unsafe extern " " fn callback_func < P : FnMut ( & Pipeline , i32 ) -> i32 > ( pipeline : * mut ffi :: CoglPipeline , layer_index : libc :: c_int , user_data : glib_sys :: gpointer , ) -> ffi :: CoglBool { let pipeline = from_glib_borrow ( pipeline ) ; let callback : * mut P = user_data as * const _ as usize as * mut P ; ( * callback ) ( & pipeline , layer_index ) } let callback = Some ( callback_func :: < P > as _ ) ; let super_callback0 : & P = & callback_data ; unsafe { ffi :: cogl_pipeline_foreach_layer ( self . to_glib_none ( ) . 0 , callback , super_callback0 as * const _ as usize as * mut _ , ) ; } }
Iterates all the layer indices of the given `self`.
Iterates all the layer indices of the given ` self ` .
&self
callback
P
&self
callback
P
`callback`
A `CoglPipelineLayerCallback` to be
called for each layer index
A ` CoglPipelineLayerCallback ` to be called for each layer index
`user_data`
Private data that will be passed to the
callback
Private data that will be passed to the callback