pub struct ZeroMqConfig {
pub url: String,
pub socket_type: Option<ZeroMqSocketType>,
pub topic: Option<String>,
pub bind: bool,
pub internal_buffer_size: Option<usize>,
}Fields§
§url: StringThe ZeroMQ URL (e.g., “tcp://127.0.0.1:5555”).
socket_type: Option<ZeroMqSocketType>The socket type (PUSH, PULL, PUB, SUB, REQ, REP).
topic: Option<String>(Consumer only) The ZeroMQ topic (for SUB sockets).
bind: boolIf true, bind to the address. If false, connect.
internal_buffer_size: Option<usize>Internal buffer size for the channel. Defaults to 128.
Implementations§
Source§impl ZeroMqConfig
impl ZeroMqConfig
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Creates a new ZeroMQ configuration with the specified URL.
pub fn with_socket_type(self, socket_type: ZeroMqSocketType) -> Self
pub fn with_bind(self, bind: bool) -> Self
Trait Implementations§
Source§impl Clone for ZeroMqConfig
impl Clone for ZeroMqConfig
Source§fn clone(&self) -> ZeroMqConfig
fn clone(&self) -> ZeroMqConfig
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 ZeroMqConfig
impl Debug for ZeroMqConfig
Source§impl Default for ZeroMqConfig
impl Default for ZeroMqConfig
Source§fn default() -> ZeroMqConfig
fn default() -> ZeroMqConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ZeroMqConfig
impl<'de> Deserialize<'de> for ZeroMqConfig
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
Source§impl SecretExtractor for ZeroMqConfig
impl SecretExtractor for ZeroMqConfig
Auto Trait Implementations§
impl Freeze for ZeroMqConfig
impl RefUnwindSafe for ZeroMqConfig
impl Send for ZeroMqConfig
impl Sync for ZeroMqConfig
impl Unpin for ZeroMqConfig
impl UnsafeUnpin for ZeroMqConfig
impl UnwindSafe for ZeroMqConfig
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