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: timetz.rs
    path of file: ./repos/rbatis/rbdc-pg/src/types
    
    the code of the file until where you have to start completion: use crate::arguments::PgArgumentBuffer;
use crate::types::decode::Decode;
use crate::types::encode::{Encode, IsNull};
use crate::value::{PgValue, PgValueFormat};
use byteorder::{BigEndian
    
    fn decode(value: PgValue) -> Result<Self, Error> {
        match value.format() {
            PgValueFormat::Binary => {
                let mut buf = Cursor::new(value.as_bytes()?);

                // TIME is encoded as the microseconds since midnight
                let microseconds = buf.read_i64::<BigEndian>()?;

                // OFFSET is encoded as seconds from UTC
                let seconds = buf.read_i32::<BigEndian>()?;

                Ok(Self(OffsetTz {
                    time: fastdate::Time::from(Duration::from_micros(microseconds as u64)),
                    offset: seconds,
                }))
            }
            PgValueFormat::Text => {
                // the `time` crate has a limited ability to parse and can't parse the
                // timezone format
                Err("reading a `TIMETZ` value in text format is not supported.".into())
            }
        }
    }