pub struct Config<Codec = JsonCodec<Vec<u8>>> { /* private fields */ }Expand description
Configuration for apalis-pgmq
Implementations§
Source§impl<Codec> Config<Codec>
impl<Codec> Config<Codec>
Sourcepub fn with_queue<S: AsRef<str>>(self, queue: S) -> Self
pub fn with_queue<S: AsRef<str>>(self, queue: S) -> Self
Sets the queue name (builder style)
Sourcepub fn poll_strategy(&self) -> &MultiStrategy
pub fn poll_strategy(&self) -> &MultiStrategy
Gets the polling strategy
Sourcepub fn with_poll_strategy(self, strategy: MultiStrategy) -> Self
pub fn with_poll_strategy(self, strategy: MultiStrategy) -> Self
Sets the polling strategy (builder style)
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Gets the buffer size
Sourcepub fn with_buffer_size(self, size: usize) -> Self
pub fn with_buffer_size(self, size: usize) -> Self
Sets the buffer size (builder style)
Sourcepub fn visibility_timeout(&self) -> Duration
pub fn visibility_timeout(&self) -> Duration
Gets the visibility timeout
Sourcepub fn with_visibility_timeout(self, timeout: Duration) -> Self
pub fn with_visibility_timeout(self, timeout: Duration) -> Self
Sets the visibility timeout (builder style)
Sourcepub fn with_codec<C>(self) -> Config<C>
pub fn with_codec<C>(self) -> Config<C>
Specify your own codec
Trait Implementations§
Auto Trait Implementations§
impl<Codec> Freeze for Config<Codec>
impl<Codec> RefUnwindSafe for Config<Codec>where
Codec: RefUnwindSafe,
impl<Codec> Send for Config<Codec>where
Codec: Send,
impl<Codec> Sync for Config<Codec>where
Codec: Sync,
impl<Codec> Unpin for Config<Codec>where
Codec: Unpin,
impl<Codec> UnsafeUnpin for Config<Codec>
impl<Codec> UnwindSafe for Config<Codec>where
Codec: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more