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: smartmodule.rs
    path of file: ./repos/fluvio/crates/fluvio-protocol/src/link
    
    the code of the file until where you have to start completion: /// This module is kept in this crate because it is referenced in the ErrorCode
///
use std::fmt;

use crate::{
    Encoder, Decoder,
    record::{Offset, RecordData, Record},
};

/// A type used to capture and serialize errors from within a SmartModule
#[derive(thiserror::Error, De
    
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let key = self
            .record_key
            .as_ref()
            .map(display_record_data)
            .unwrap_or_else(|| "NULL".to_string());
        let value = display_record_data(&self.record_value);
        write!(
            f,
            "{}\n\n\
            SmartModule Info: \n    \
            Type: {}\n    \
            Offset: {}\n    \
            Key: {}\n    \
            Value: {}",
            self.hint, self.kind, self.offset, key, value,
        )
    }