mod builder;
pub(crate) mod metadata;
pub(crate) mod service;
use bytes::Bytes;
use crate::Client;
pub use self::{builder::Builder, metadata::Metadata, service::Service};
#[derive(Debug)]
pub struct Sequence {
client: Client,
id: String,
sequence: Bytes,
}
impl Sequence {
pub(crate) fn new(client: Client, id: String, sequence: Bytes) -> Self {
Self {
client,
id,
sequence,
}
}
pub fn sequence(&self) -> Bytes {
self.sequence.clone()
}
pub fn metadata(&self) -> metadata::Builder {
metadata::Builder::new(self.client.clone(), &self.id)
}
}