pub struct Config<E, R>where
E: FullExecutor,
R: Reactor,{
pub name: String,
pub address: Vec<String>,
pub reconnect_delay: Duration,
pub executor: Arc<E>,
pub reactor: Arc<R>,
}Expand description
Configuration for the rabbitmq connection
Fields§
§name: String§address: Vec<String>§reconnect_delay: Duration§executor: Arc<E>§reactor: Arc<R>Implementations§
Source§impl<E, R> Config<E, R>where
E: FullExecutor,
R: Reactor,
impl<E, R> Config<E, R>where
E: FullExecutor,
R: Reactor,
Sourcepub fn new<I: Display, T: Iterator<Item = I>>(
name: String,
host: T,
user: &str,
password: &str,
reconnect_delay: Duration,
executor: E,
reactor: R,
) -> Self
pub fn new<I: Display, T: Iterator<Item = I>>( name: String, host: T, user: &str, password: &str, reconnect_delay: Duration, executor: E, reactor: R, ) -> Self
Creates a new configuration
§Arguments:
- host - the address to rabbitmq server
- user - user login name
- password - user login password
- sleep_duration - duration of the sleep before trying reconnect again to the rabbitmq server
Auto Trait Implementations§
impl<E, R> Freeze for Config<E, R>
impl<E, R> RefUnwindSafe for Config<E, R>where
E: RefUnwindSafe,
R: RefUnwindSafe,
impl<E, R> Send for Config<E, R>
impl<E, R> Sync for Config<E, R>
impl<E, R> Unpin for Config<E, R>
impl<E, R> UnwindSafe for Config<E, R>where
E: RefUnwindSafe,
R: RefUnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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