use crate::Result;
#[derive(Clone, Debug)]
pub struct Publisher<T>
where
T: super::stub::Publisher + std::fmt::Debug + Send + Sync,
{
inner: T,
}
impl<T> Publisher<T>
where
T: super::stub::Publisher + std::fmt::Debug + Send + Sync,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
impl<T> super::stub::Publisher for Publisher<T>
where
T: super::stub::Publisher + std::fmt::Debug + Send + Sync,
{
#[tracing::instrument(ret)]
async fn publish(
&self,
req: crate::model::PublishRequest,
options: gax::options::RequestOptions,
) -> Result<gax::response::Response<crate::model::PublishResponse>> {
self.inner.publish(req, options).await
}
}