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: parse.rs
    path of file: ./repos/snarkVM/synthesizer/program/src/function/output
    
    the code of the file until where you have to start completion: // Copyright (C) 2019-2023 Aleo Systems Inc.
// This file is part of the snarkVM library.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use super::*;

impl<N: Network> Parser for Output<N> {
    /// Parses a string into an output statement.
    /// The output statement is of the form `output {operand} as {value_type};`.
    #[inline]
    fn parse(string: &str) -> ParserResult
    
    fn test_output_parse() -> Result<()> {
        // Register
        let output = Output::<CurrentNetwork>::parse("output r0 as field.private;").unwrap().1;
        assert_eq!(output.operand(), &Operand::Register(Register::<CurrentNetwork>::Locator(0)));
        assert_eq!(output.value_type(), &ValueType::<CurrentNetwork>::from_str("field.private")?);

        // Literal
        let output = Output::<CurrentNetwork>::parse("output 0u8 as u8.public;").unwrap().1;
        assert_eq!(output.operand(), &Operand::Literal(Literal::<CurrentNetwork>::U8(U8::new(0))));
        assert_eq!(output.value_type(), &ValueType::<CurrentNetwork>::from_str("u8.public")?);

        // Struct
        let output = Output::<CurrentNetwork>::parse("output r1 as signature.private;").unwrap().1;
        assert_eq!(output.operand(), &Operand::Register(Register::<CurrentNetwork>::Locator(1)));
        assert_eq!(output.value_type(), &ValueType::<CurrentNetwork>::from_str("signature.private")?);

        // Record
        let output = Output::<CurrentNetwork>::parse("output r2 as token.record;").unwrap().1;
        assert_eq!(output.operand(), &Operand::Register(Register::<CurrentNetwork>::Locator(2)));
        assert_eq!(output.value_type(), &ValueType::<CurrentNetwork>::from_str("token.record")?);

        Ok(())
    }