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: port_type.rs
    path of file: ./repos/xsd-parser-rs/wsdl-parser/src/parser
    
    the code of the file until where you have to start completion: use crate::parser::constants::attribute;
use crate::parser::{ElementType, WsdlElement};
use roxmltree::Node;

// Content: Sequence [1..1]
// wsdl:documentation   [0..1] from type wsdl:tDocumented
// wsdl:operation       [0..*]

// Attributes:
// Any attribute   [0..*]		      Namespace: ##other, Process Contents: lax	from type wsdl:tExtensibleAttributesDocumented
// name	           [1..1] xsd:NCName

// Used in Group wsdl:anyTopLevelOptionalElement
// Type wsdl:tDefinitions via reference to wsdl:anyTopLevelOptionalElement (Element wsdl:definitions)

#[derive(Clone, Debug)]
pub struct PortType<'a> {
    node: Node<'a, 'a>,
    operations: Vec<Operation<'a>>,
}

impl<'a> PortType<'a> {
    pub fn new(node: &Node<'a, '_>) -> Self {
        Self {
            node: *node,
            operations: node
                .children()
                .filter_map(|node| {
                    if node.is_element() && node.wsdl_type() == ElementType::Operation {
                        Some(Operation::new(&node))
                    } else {
                        None
                    }
                })
                .collect(),
        }
    }

    pub fn name(&self) -> &'a str {
        self.node
            .attribute(attribute
    
    pub fn new(node: &Node<'a, '_>) -> Self {
        let mut children = node.children().filter(|n| n.is_element());

        while let Some(ch) = children.next() {
            match ch.wsdl_type() {
                ElementType::Input => {
                    // wsdl:request-response-or-one-way-operation
                    return if let Some(output_node) = children.next() {
                        // RequestResponse
                        assert_eq!(
                            output_node.wsdl_type(),
                            ElementType::Output,
                            "{:?}",
                            output_node
                        );
                        OperationType::RequestResponse {
                            input: Param::new(&ch),
                            output: Param::new(&output_node),
                            faults: children
                                .filter_map(|n| match n.wsdl_type() {
                                    ElementType::Fault => Some(Fault::new(&n)),
                                    _ => None,
                                })
                                .collect(),
                        }
                    } else {
                        // OneWay
                        OperationType::OneWay {
                            input: Param::new(&ch),
                        }
                    };
                }
                ElementType::Output => {
                    // wsdl:solicit-response-or-notification-operation
                    return if let Some(input_node) = children.next() {
                        // SolicitResponse
                        assert_eq!(input_node.wsdl_type(), ElementType::Input);
                        OperationType::SolicitResponse {
                            output: Param::new(&ch),
                            input: Param::new(&input_node),
                            faults: children
                                .filter_map(|n| match n.wsdl_type() {
                                    ElementType::Fault => Some(Fault::new(&n)),
                                    _ => None,
                                })
                                .collect(),
                        }
                    } else {
                        OperationType::Notification {
                            output: Param::new(&ch),
                        }
                    };
                }
                _ => continue,
            };
        }
        unreachable!("Content of wsdl:operation must contain input or output")
    }