pub fn extract(mut self) -> (egui::style::Style, egui::FontDefinitions) {
        // Allows automatic migrations to be performed.
        if cfg!(feature = "migrate_14_to_15") {
            println!("migrate egui 14 -> 15!");
            self = migrations::migration_from_14_to_15(self);
        } else {
            // This is a workaround since the font_data is not automatically serialized.
            // If the keys are not found in the font data, we need to add them before allowing the data to be extracted
            for (key, value) in self.font_data.iter() {
                if !self.font_definitions.font_data.contains_key(key)
                    && !DEFAULT_FONTS.contains(&key.as_str())
                {
                    let data = base64::decode(value).expect("this should work");
                    self.font_definitions
                        .font_data
                        .insert(key.to_owned(), std::borrow::Cow::Owned(data));
                }
            }
        }

        (self.style, self.font_definitions)
    }
/// Extracts the theme information destructively. This will encode all of the serialized data into an `egui::Context` ready format.
///
/// # Important
/// The theme will no longer be usable after extraction and will move the `Style` and `FontDefinitions` data for use.
///
/// Style and font data should be managed by your application after extraction.
Extracts the theme information destructively. This will encode all of the serialized data into an `egui::Context` ready format.
Extracts the theme information destructively . This will encode all of the serialized data into an ` egui :: Context ` ready format .
pub fn extract(mut self) -> (egui::style::Style, egui::FontDefinitions) {
        // Allows automatic migrations to be performed.
        if cfg!(feature = "migrate_14_to_15") {
            println!("migrate egui 14 -> 15!");
            self = migrations::migration_from_14_to_15(self);
        } else {
            // This is a workaround since the font_data is not automatically serialized.
            // If the keys are not found in the font data, we need to add them before allowing the data to be extracted
            for (key, value) in self.font_data.iter() {
                if !self.font_definitions.font_data.contains_key(key)
                    && !DEFAULT_FONTS.contains(&key.as_str())
                {
                    let data = base64::decode(value).expect("this should work");
                    self.font_definitions
                        .font_data
                        .insert(key.to_owned(), std::borrow::Cow::Owned(data));
                }
            }
        }
        (self.style, self.font_definitions)
    }
pub fn extract ( mut self ) -> ( egui :: style :: Style , egui :: FontDefinitions ) { // Allows automatic migrations to be performed. if cfg ! ( feature " " ) { println ! ( " " ) ; self = migrations :: migration_from_14_to_15 ( self ) ; } else { // This is a workaround since the font_data is not automatically serialized. // If the keys are not found in the font data, we need to add them before allowing the data to be extracted for ( key , value ) in self . font_data . iter ( ) { if ! self . font_definitions . font_data . contains_key ( key ) && ! DEFAULT_FONTS . contains ( & key . as_str ( ) ) { let data = base64 :: decode ( value ) . expect ( " " ) ; self . font_definitions . font_data . insert ( key . to_owned ( ) , std :: borrow :: Cow :: Owned ( data ) ) ; } } } ( self . style , self . font_definitions ) }
Extracts the theme information destructively.
Extracts the theme information destructively .
mut self
important
The theme will no longer be usable after extraction and will move the `Style` and `FontDefinitions` data for use.

Style and font data should be managed by your application after extraction.
The theme will no longer be usable after extraction and will move the ` Style ` and ` FontDefinitions ` data for use . Style and font data should be managed by your application after extraction .