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: content.rs
    path of file: ./repos/rio/sugarloaf/src/layout
    
    the code of the file until where you have to start completion: // Copyright (c) 2023-present, Raphael Amorim.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//
// content.rs was originally retired from dfrg/swash_demo licensed under MIT
// https://github.com/dfrg/swash_demo/blob/master/LICE
    
    pub fn add_text(&mut self, text: &str) {
        if let Some(span) = self.spans.last() {
            let index = self.content.fragments.len() as u32;
            let start = self.content.text.len() as u32;
            self.content.text.push_str(text);
            let end = self.content.text.len() as u32;
            self.content.fragments.push((start, end));
            self.content.spans[*span as usize]
                .elements
                .push(SpanElement::Fragment(index));
        }
    }