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: exchange_sink_writer.rs
    path of file: ./repos/databend/src/query/service/src/api/rpc/exchange
    
    the code of the file until where you have to start completion: // Copyright 2021 Datafuse Labs
//
// 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 L
    
    async fn consume(&mut self, mut data_block: DataBlock) -> Result<bool> {
        let serialize_meta = match data_block.take_meta() {
            None => Err(ErrorCode::Internal(
                "ExchangeWriterSink only recv ExchangeSerializeMeta.",
            )),
            Some(block_meta) => ExchangeSerializeMeta::downcast_from(block_meta).ok_or_else(|| {
                ErrorCode::Internal("ExchangeWriterSink only recv ExchangeSerializeMeta.")
            }),
        }?;

        let mut bytes = 0;
        let count = serialize_meta.packet.len();
        for packet in serialize_meta.packet {
            bytes += packet.bytes_size();
            if let Err(error) = self.flight_sender.send(packet).await {
                if error.code() == ErrorCode::ABORTED_QUERY {
                    return Ok(true);
                }

                return Err(error);
            }
        }

        {
            metrics_inc_exchange_write_count(count);
            metrics_inc_exchange_write_bytes(bytes);
            Profile::record_usize_profile(ProfileStatisticsName::ExchangeBytes, bytes);
        }

        Ok(false)
    }