use crate::providers::mysql::gtid::uuid::Uuid;
use std::fmt;
#[derive(Clone, Debug)]
pub struct Gtid {
pub source_id: Uuid,
pub transaction_id: u64,
}
impl Gtid {
pub fn new(source_id: Uuid, transaction_id: u64) -> Self {
Self {
source_id,
transaction_id,
}
}
}
impl fmt::Display for Gtid {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}:{}", self.source_id, self.transaction_id)
}
}