pub struct ArrayQueuePusher<T> { /* private fields */ }Expand description
A sod::Service that is sod::Retryable and pushes input to an underlying crossbeam::queue::ArrayQueue, returning the element as an error when the queue is full.
Implementations§
Source§impl<T> ArrayQueuePusher<T>
impl<T> ArrayQueuePusher<T>
pub fn new(q: Arc<ArrayQueue<T>>) -> Self
Trait Implementations§
Source§impl<T> Retryable<T, T> for ArrayQueuePusher<T>
impl<T> Retryable<T, T> for ArrayQueuePusher<T>
fn parse_retry(&self, err: T) -> Result<T, RetryError<T>>
Source§impl<T> Service for ArrayQueuePusher<T>
impl<T> Service for ArrayQueuePusher<T>
type Input = T
type Output = ()
type Error = T
Source§fn process(&self, input: T) -> Result<Self::Output, Self::Error>
fn process(&self, input: T) -> Result<Self::Output, Self::Error>
Process an input, producing a
Result<Self::Output, Self::Error>Source§fn into_mut(self) -> ServiceMut<Self>where
Self: Sized,
fn into_mut(self) -> ServiceMut<Self>where
Self: Sized,
Source§fn into_async(self) -> ServiceAsync<Self>
fn into_async(self) -> ServiceAsync<Self>
Source§fn into_dyn<'a>(self) -> DynService<'a, Self::Input, Self::Output, Self::Error>where
Self: Sized + 'static,
fn into_dyn<'a>(self) -> DynService<'a, Self::Input, Self::Output, Self::Error>where
Self: Sized + 'static,
Convert this
Service into a DynServiceAuto Trait Implementations§
impl<T> Freeze for ArrayQueuePusher<T>
impl<T> RefUnwindSafe for ArrayQueuePusher<T>
impl<T> Send for ArrayQueuePusher<T>where
T: Send,
impl<T> Sync for ArrayQueuePusher<T>where
T: Send,
impl<T> Unpin for ArrayQueuePusher<T>
impl<T> UnwindSafe for ArrayQueuePusher<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more