#[non_exhaustive]pub enum ConnectionConfig {
Database(DatabaseQueue),
Redis(RedisQueue),
Sqs(SqsQueue),
Cloud(CloudQueue),
Sync,
Discard,
Custom(CustomConnection),
}Expand description
Where a named connection keeps its jobs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Database(DatabaseQueue)
Keeps jobs in a database table. The application creates the table with the jobs table schema.
Redis(RedisQueue)
Keeps jobs in Redis, through a named Redis connection. Needs the redis feature.
Sqs(SqsQueue)
Keeps jobs in Amazon SQS queues. Needs the sqs feature.
Cloud(CloudQueue)
Keeps jobs in Laravel Cloud’s managed queues, which are SQS queues. Needs the sqs
feature.
Sync
Keeps no jobs. Each job runs as soon as it’s dispatched, in the dispatching process.
Discard
Keeps no jobs. Each job is discarded, so use it to turn queued work off.
Custom(CustomConnection)
Keeps jobs with a driver that the application or a package registers by name. To learn
more, read ConnectionConfig::custom.
Implementations§
Source§impl ConnectionConfig
impl ConnectionConfig
Sourcepub fn custom(driver: impl Into<String>) -> CustomConnection
pub fn custom(driver: impl Into<String>) -> CustomConnection
Returns a connection that uses a driver registered with
Drivers::extend.
use laravel::config::queue::{ConnectionConfig, Queue};
let mut queue = Queue::default();
queue.add_connection(
"beanstalkd",
ConnectionConfig::custom("beanstalkd").queue("emails"),
);When several connections use the same driver with different options, give each connection its own settings.
Trait Implementations§
Source§impl Clone for ConnectionConfig
impl Clone for ConnectionConfig
Source§fn clone(&self) -> ConnectionConfig
fn clone(&self) -> ConnectionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectionConfig
impl Debug for ConnectionConfig
impl Eq for ConnectionConfig
Source§impl From<CloudQueue> for ConnectionConfig
impl From<CloudQueue> for ConnectionConfig
Source§fn from(queue: CloudQueue) -> ConnectionConfig
fn from(queue: CloudQueue) -> ConnectionConfig
Source§impl From<CustomConnection> for ConnectionConfig
impl From<CustomConnection> for ConnectionConfig
Source§fn from(connection: CustomConnection) -> ConnectionConfig
fn from(connection: CustomConnection) -> ConnectionConfig
Source§impl From<DatabaseQueue> for ConnectionConfig
impl From<DatabaseQueue> for ConnectionConfig
Source§fn from(queue: DatabaseQueue) -> ConnectionConfig
fn from(queue: DatabaseQueue) -> ConnectionConfig
Source§impl From<RedisQueue> for ConnectionConfig
impl From<RedisQueue> for ConnectionConfig
Source§fn from(queue: RedisQueue) -> ConnectionConfig
fn from(queue: RedisQueue) -> ConnectionConfig
Source§impl From<SqsQueue> for ConnectionConfig
impl From<SqsQueue> for ConnectionConfig
Source§fn from(queue: SqsQueue) -> ConnectionConfig
fn from(queue: SqsQueue) -> ConnectionConfig
Source§impl PartialEq for ConnectionConfig
impl PartialEq for ConnectionConfig
impl StructuralPartialEq for ConnectionConfig
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectionConfig
impl !UnwindSafe for ConnectionConfig
impl Forget for ConnectionConfig
impl Freeze for ConnectionConfig
impl Move for ConnectionConfig
impl Send for ConnectionConfig
impl Sync for ConnectionConfig
impl Unpin for ConnectionConfig
impl UnsafeUnpin for ConnectionConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn Settings> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Settings>>: UnsafeUnpin,
&'static str: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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