use super::{FixValue, Timestamp, Tz};
use crate::Buffer;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct TzTimestamp {
timestamp: Timestamp,
tz: Tz,
}
impl TzTimestamp {
pub fn timestamp(&self) -> Timestamp {
self.timestamp.clone()
}
pub fn timezone(&self) -> Tz {
self.tz
}
}
impl<'a> FixValue<'a> for TzTimestamp {
type Error = &'static str;
type SerializeSettings = ();
fn serialize_with<B>(&self, buffer: &mut B, _settings: ()) -> usize
where
B: Buffer,
{
self.timestamp().serialize(buffer)
}
fn deserialize(_data: &'a [u8]) -> Result<Self, Self::Error> {
unimplemented!()
}
}