pub fn is_force(feat: &geojson::Feature) -> Result<bool, FeatureError> {
    match feat.foreign_members {
        None => Ok(false),
        Some(ref members) => match members.get("force") {
            Some(force) => {
                match force.as_bool() {
                    Some(true) => {
                        if get_action(&feat)? != Action::Create {
                            return Err(import_error(&feat, "force can only be used on create"));
                        }

                        match get_key(&feat)? {
                            None => {
                                Err(import_error(&feat, "force can only be used with a key value"))
                            },
                            Some(_) => {
                                Ok(true)
                            }
                        }
                    },
                    Some(false) => Ok(false),
                    None => Err(import_error(&feat, "force must be a boolean"))
                }
            },
            None => Ok(false)
        }
    }
}
///
/// Check if the feature has the force: true flag set and if so
/// validate that it meets the force:true acceptions
///
Check if the feature has the force: true flag set and if so
validate that it meets the force:true acceptions
Check if the feature has the force : true flag set and if so validate that it meets the force : true acceptions
pub fn is_force(feat: &geojson::Feature) -> Result<bool, FeatureError> {
    match feat.foreign_members {
        None => Ok(false),
        Some(ref members) => match members.get("force") {
            Some(force) => {
                match force.as_bool() {
                    Some(true) => {
                        if get_action(&feat)? != Action::Create {
                            return Err(import_error(&feat, "force can only be used on create"));
                        }
                        match get_key(&feat)? {
                            None => {
                                Err(import_error(&feat, "force can only be used with a key value"))
                            },
                            Some(_) => {
                                Ok(true)
                            }
                        }
                    },
                    Some(false) => Ok(false),
                    None => Err(import_error(&feat, "force must be a boolean"))
                }
            },
            None => Ok(false)
        }
    }
}
pub fn is_force ( feat : & geojson :: Feature ) -> Result < bool , FeatureError > { match feat . foreign_members { None => Ok ( false ) , Some ( ref members ) => match members . get ( " " ) { Some ( force ) => { match force . as_bool ( ) { Some ( true ) => { if get_action ( & feat ) ? != Action :: Create { return Err ( import_error ( & feat , " " ) ) ; } match get_key ( & feat ) ? { None => { Err ( import_error ( & feat , " " ) ) } , Some ( _ ) => { Ok ( true ) } } } , Some ( false ) => Ok ( false ) , None => Err ( import_error ( & feat , " " ) ) } } , None => Ok ( false ) } } }
Check if the feature has the force: true flag set and if so
validate that it meets the force:true acceptions
Check if the feature has the force : true flag set and if so validate that it meets the force : true acceptions
feat
&geojson::Feature
feat
&geojson::Feature