pub struct CustomConnection {
pub driver: String,
pub queue: String,
pub settings: Option<DriverSettings>,
}Expand description
A connection that uses a driver the application or a package registers by name.
ConnectionConfig::custom returns one.
Fields§
§driver: StringThe driver’s name, matched case-insensitively.
queue: StringThe queue that jobs join when they don’t name one.
settings: Option<DriverSettings>The connection’s own settings, which the driver’s factory reads with
ConnectionDefinition::settings.
Implementations§
Source§impl CustomConnection
impl CustomConnection
Sourcepub fn queue(self, queue: impl Into<String>) -> CustomConnection
pub fn queue(self, queue: impl Into<String>) -> CustomConnection
Sets the queue that jobs join when they don’t name one.
Sourcepub fn settings<T>(self, settings: T) -> CustomConnection
pub fn settings<T>(self, settings: T) -> CustomConnection
Gives the connection settings of a type that the driver defines, for a driver that several connections use with different options.
use laravel::config::queue::{ConnectionConfig, Queue};
#[derive(Debug)]
struct BeanstalkdSettings {
host: String,
}
let mut queue = Queue::default();
queue.add_connection(
"beanstalkd",
ConnectionConfig::custom("beanstalkd").settings(BeanstalkdSettings {
host: "localhost".into(),
}),
);Trait Implementations§
Source§impl Clone for CustomConnection
impl Clone for CustomConnection
Source§fn clone(&self) -> CustomConnection
fn clone(&self) -> CustomConnection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomConnection
impl Debug for CustomConnection
impl Eq for CustomConnection
Source§impl From<CustomConnection> for ConnectionConfig
impl From<CustomConnection> for ConnectionConfig
Source§fn from(connection: CustomConnection) -> ConnectionConfig
fn from(connection: CustomConnection) -> ConnectionConfig
Converts to this type from the input type.
Source§impl PartialEq for CustomConnection
impl PartialEq for CustomConnection
impl StructuralPartialEq for CustomConnection
Auto Trait Implementations§
impl !RefUnwindSafe for CustomConnection
impl !UnwindSafe for CustomConnection
impl Forget for CustomConnection
impl Freeze for CustomConnection
impl Move for CustomConnection
impl Send for CustomConnection
impl Sync for CustomConnection
impl Unpin for CustomConnection
impl UnsafeUnpin for CustomConnectionwhere
*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
Mutably borrows from an owned value. Read more
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
Compare self to
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> ⓘ
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 moreCreates a shared type from an unshared type.