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: dynamic_typing.rs
    path of file: ./repos/Tuxedo/tuxedo-core/src
    
    the code of the file until where you have to start completion: //! Dynamic Typing utilities for Tuxedo runtimes
//!
//! # Motivation
//!

    
    pub fn extract<T: UtxoData>(&self) -> Result<T, DynamicTypingError> {
        // The first four bytes represent the type id that that was encoded. If they match the type
        // we are trying to decode into, we continue, otherwise we error out.
        if self.type_id == <T as UtxoData>::TYPE_ID {
            T::decode(&mut &self.data[..]).map_err(|_| DynamicTypingError::DecodingFailed)
        } else {
            Err(DynamicTypingError::WrongType)
        }
    }