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: padding.rs
    path of file: ./repos/s2n-quic/quic/s2n-quic-core/src/frame
    
    the code of the file until where you have to start completion: // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

use crate::frame::Tag;
use s2n_codec::{decoder_parameterized_value, Encoder, EncoderValue};

//= https://www.rfc-editor.org/r
    
        fn decode(_tag: Tag, buffer: Buffer) -> Result<Self> {
            let mut length = 0;
            while buffer
                .peek_byte(length)
                .map(|v| v == padding_tag!())
                .unwrap_or(false)
            {
                length += 1;
            }

            let buffer = buffer.skip(length).expect("padding already verified");

            // add one for tag itself - this needs to come after the skip, as the
            // tag has already been read.
            length += 1;

            let frame = Padding { length };

            Ok((frame, buffer))
        }