pub fn create_layer(&mut self) -> Result<&mut Layer> {
        let c_name = CString::new("")?;
        let c_layer = unsafe { gdal_sys::OGR_DS_CreateLayer(
            self.c_dataset,
            c_name.as_ptr(),
            null_mut(),
            OGRwkbGeometryType::wkbUnknown,
            null_mut(),
        ) };
        if c_layer.is_null() {
            Err(_last_null_pointer_err("OGR_DS_CreateLayer"))?;
        };
        self._child_layer(c_layer);
        Ok(self.layers.last_mut().unwrap()) // TODO: is this safe?
    }
/// Create a new layer with a blank definition.
Create a new layer with a blank definition.
Create a new layer with a blank definition .
pub fn create_layer(&mut self) -> Result<&mut Layer> {
        let c_name = CString::new("")?;
        let c_layer = unsafe { gdal_sys::OGR_DS_CreateLayer(
            self.c_dataset,
            c_name.as_ptr(),
            null_mut(),
            OGRwkbGeometryType::wkbUnknown,
            null_mut(),
        ) };
        if c_layer.is_null() {
            Err(_last_null_pointer_err("OGR_DS_CreateLayer"))?;
        };
        self._child_layer(c_layer);
        Ok(self.layers.last_mut().unwrap()) // TODO: is this safe?
    }
pub fn create_layer ( & mut self ) -> Result < & mut Layer > { let c_name = CString :: new ( " " ) ? ; let c_layer = unsafe { gdal_sys :: OGR_DS_CreateLayer ( self . c_dataset , c_name . as_ptr ( ) , null_mut ( ) , OGRwkbGeometryType :: wkbUnknown , null_mut ( ) , ) } ; if c_layer . is_null ( ) { Err ( _last_null_pointer_err ( " " ) ) ? ; } ; self . _child_layer ( c_layer ) ; Ok ( self . layers . last_mut ( ) . unwrap ( ) ) // TODO: is this safe? }
Create a new layer with a blank definition.
Create a new layer with a blank definition .
&mut self
&mut self