Struct tokio_nsq::NSQConfigShared [−][src]
Configuration options shared by both produces and consumers
Implementations
impl NSQConfigShared
[src]
pub fn new() -> Self
[src]
Construct a configuration with sane defaults.
pub fn set_backoff_max_wait(self, duration: Duration) -> Self
[src]
The maximum reconnect backoff wait. Defaults to 60 seconds.
pub fn set_backoff_healthy_after(self, duration: Duration) -> Self
[src]
How long a connection should be healthy before backoff is reset. Defaults to 45 seconds.
pub fn set_compression(self, compression: NSQConfigSharedCompression) -> Self
[src]
Connection compression options. Defaults to no compression.
pub fn set_credentials(self, credentials: Vec<u8>) -> Self
[src]
Credentials to send NSQD if authentication is requried. Defaults to no credentials.
pub fn set_tls(self, tls: NSQConfigSharedTLS) -> Self
[src]
Connection encryption options. Defaults to no encryption
pub fn set_client_id<S: Into<String>>(self, client_id: S) -> Self
[src]
A string used to identify an NSQ client. Defaults to anonymous identity.
pub fn set_write_timeout(self, duration: Option<Duration>) -> Self
[src]
Timeout for socket write operations. Defaults to 10 seconds.
Setting the duration to None
disables write timeouts.
pub fn set_read_timeout(self, duration: Option<Duration>) -> Self
[src]
Timeout for socket read operations. Defaults to 60 seconds. Must be
greater than the heartbeat interval. Setting the duration to None
disables read timeouts.
pub fn set_hostname<S: Into<String>>(self, hostname: S) -> Self
[src]
The hostname sent to NSQD. Defaults to the hostname provided by the operating system.
pub fn set_user_agent<S: Into<String>>(self, user_agent: S) -> Self
[src]
The user agent sent to NSQD. Defaults to “tokio_nsq/package_version”.
pub fn set_flush_interval(self, duration: Duration) -> Self
[src]
How often the TCP write buffer should be flushed. An outgoing write buffer substantially increases network performance, particularly in the context of compression. Defaults to every 250 milliseconds.
Trait Implementations
impl Clone for NSQConfigShared
[src]
fn clone(&self) -> NSQConfigShared
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for NSQConfigShared
[src]
Auto Trait Implementations
impl !RefUnwindSafe for NSQConfigShared
impl Send for NSQConfigShared
impl Sync for NSQConfigShared
impl Unpin for NSQConfigShared
impl !UnwindSafe for NSQConfigShared
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,