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: attribute.rs
    path of file: ./repos/xsd-parser-rs/xsd-parser/src/parser
    
    the code of the file until where you have to start completion: use roxmltree::Node;

use crate::parser::node_parser::parse_node;
use crate::parser::types::{Alias, RsEntity, Struct, StructField, StructFieldSource, TypeModifier};
use crate::parser::utils::get_documentation;
use crate::parser::xsd_elements::{ElementType, UseType, XsdNode};

pub fn parse_attribute(node: &Node, parent: &Node) -> RsEntity {
    if parent.xsd_type() == ElementType::Schema {
        return parse_global_attribute(node);
    }

    let n
    
pub fn parse_attribute(node: &Node, parent: &Node) -> RsEntity {
    if parent.xsd_type() == ElementType::Schema {
        return parse_global_attribute(node);
    }

    let name = node
        .attr_name()
        .or_else(|| node.attr_ref())
        .expect("All attributes have name or ref")
        .to_string();

    let type_name = node
        .attr_type()
        .or_else(|| node.attr_ref())
        .unwrap_or("String")
        .to_string();

    let type_modifier = match node.attr_use() {
        UseType::Optional => TypeModifier::Option,
        UseType::Prohibited => TypeModifier::Empty,
        UseType::Required => TypeModifier::None,
    };

    RsEntity::StructField(StructField {
        type_name,
        comment: get_documentation(node),
        subtypes: vec![],
        name,
        source: StructFieldSource::Attribute,
        type_modifiers: vec![type_modifier],
    })
}