pub struct MemoryConfig {
pub topic: String,
pub capacity: Option<usize>,
pub request_reply: bool,
pub request_timeout_ms: Option<u64>,
pub subscribe_mode: bool,
pub enable_nack: bool,
}Fields§
§topic: StringThe topic name for the in-memory channel.
capacity: Option<usize>The capacity of the channel. Defaults to 100.
request_reply: bool(Publisher only) If true, send() waits for a response.
request_timeout_ms: Option<u64>(Publisher only) Timeout for request-reply operations in milliseconds. Defaults to 30000ms.
subscribe_mode: bool(Consumer only) If true, act as a Subscriber (fan-out). Defaults to false (queue).
enable_nack: bool(Consumer only) If true, enables NACK support (re-queuing), which requires cloning messages. Defaults to false.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 MemoryConfig
impl Debug for MemoryConfig
Source§impl Default for MemoryConfig
impl Default for MemoryConfig
Source§fn default() -> MemoryConfig
fn default() -> MemoryConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MemoryConfig
impl<'de> Deserialize<'de> for MemoryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnwindSafe for MemoryConfig
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