Struct venta::BackgroundProducer
source · [−]pub struct BackgroundProducer { /* private fields */ }
Implementations
sourceimpl BackgroundProducer
impl BackgroundProducer
pub async fn spawn_simple(
url: impl Into<String>,
topic: impl Into<String>,
producer_name: Option<String>
) -> Result<Self>
pub async fn spawn<Fut, F, E>(producer_factory: F) -> Result<Self> where
Fut: Future<Output = Result<Producer<TokioExecutor>, E>> + Send,
E: Into<Error> + StdError,
F: Fn() -> Fut + Send + Sync + 'static,
pub fn produce(&self) -> ProducedMessage
pub fn has_pending_messages(&self) -> bool
pub fn num_pending_messages(&self) -> u64
Trait Implementations
sourceimpl Clone for BackgroundProducer
impl Clone for BackgroundProducer
sourcefn clone(&self) -> BackgroundProducer
fn clone(&self) -> BackgroundProducer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for BackgroundProducer
impl Send for BackgroundProducer
impl Sync for BackgroundProducer
impl Unpin for BackgroundProducer
impl !UnwindSafe for BackgroundProducer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more