You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: derived_core_properties.rs
    path of file: ./repos/rust-unic/gen/src/source/ucd
    
    the code of the file until where you have to start completion: // Copyright 2017 The UNIC Project Developers.
//
// See the COPYRIGHT file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::char;
use std::collections::BTreeSet;
use std::str::FromStr;

use crate::source::utils::read;

use super::BINARY_PROPERTIES_REGEX;

lazy_static! {
    pub static ref DERIVED_CORE_PROPERTIES: DerivedCoreProperties = {
        read("external/unicode/ucd/data/DerivedCoreProperties.txt")
            .parse()
            .unwrap()
    };
}

#[derive(Clone, Debug, Default)]
pub struct DerivedCoreProperties {
    /// Characters with the `Lowercase` property. For more information,
    /// see _Chapter 4, Character Properties_ in ***[Unicode]***.
    ///
    //
    
    fn from_str(str: &str) -> Result<Self, Self::Err> {
        let mut props = DerivedCoreProperties::default();

        for capture in BINARY_PROPERTIES_REGEX.captures_iter(str) {
            let low = char::from_u32(u32::from_str_radix(&capture[1], 16).unwrap()).unwrap();
            let high = capture
                .get(2)
                .map(|s| u32::from_str_radix(s.as_str(), 16).unwrap())
                .map(|u| char::from_u32(u).unwrap())
                .unwrap_or(low);
            let range = chars!(low..=high);

            match &capture[3] {
                "Lowercase" => props.lowercase.extend(range),
                "Uppercase" => props.uppercase.extend(range),
                "Cased" => props.cased.extend(range),
                "Case_Ignorable" => props.case_ignorable.extend(range),
                "Changes_When_Lowercased" => props.changes_when_lowercased.extend(range),
                "Changes_When_Uppercased" => props.changes_when_uppercased.extend(range),
                "Changes_When_Titlecased" => props.changes_when_titlecased.extend(range),
                "Changes_When_Casefolded" => props.changes_when_casefolded.extend(range),
                "Changes_When_Casemapped" => props.changes_when_casemapped.extend(range),
                "Alphabetic" => props.alphabetic.extend(range),
                "Default_Ignorable_Code_Point" => props.default_ignorable_code_point.extend(range),
                "Grapheme_Extend" => props.grapheme_extend.extend(range),
                "Grapheme_Base" => props.grapheme_base.extend(range),
                "Grapheme_Link" => { /* ignored */ }
                "Math" => props.math.extend(range),
                "ID_Start" => props.id_start.extend(range),
                "ID_Continue" => props.id_continue.extend(range),
                "XID_Start" => props.xid_start.extend(range),
                "XID_Continue" => props.xid_continue.extend(range),
                prop => panic!("Unsupported DerivedCoreProperty `{}`", prop),
            }
        }

        Ok(props)
    }