pub struct SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent> { /* private fields */ }
Expand description
SessionBuilder
allows setting up a session with customizable options that are not exposed by
the session
function such as buffer size, timeouts, and more.
For more detailed documentation on all the configuration field, refer to the official library documentation.
Implementations§
Source§impl<'session, Host, Vpn, Username, Password, OnMessage, OnEvent> SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent>
impl<'session, Host, Vpn, Username, Password, OnMessage, OnEvent> SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent>
pub fn build( self, ) -> Result<Session<'session, OnMessage, OnEvent>, SessionBuilderError>
pub fn host_name(self, host_name: Host) -> Self
pub fn vpn_name(self, vpn_name: Vpn) -> Self
pub fn username(self, username: Username) -> Self
pub fn password(self, password: Password) -> Self
pub fn on_message(self, on_message: OnMessage) -> Self
pub fn on_event(self, on_event: OnEvent) -> Self
pub fn buffer_size_bytes(self, buffer_size_bytes: u64) -> Self
pub fn block_write_timeout_ms(self, write_timeout_ms: u64) -> Self
pub fn connect_timeout_ms(self, connect_timeout_ms: u64) -> Self
pub fn subconfirm_timeout_ms(self, subconfirm_timeout_ms: u64) -> Self
pub fn ignore_dup_subscription_error( self, ignore_dup_subscription_error: bool, ) -> Self
pub fn tcp_nodelay(self, tcp_nodelay: bool) -> Self
pub fn socket_send_buf_size_bytes(self, socket_send_buf_size_bytes: u64) -> Self
pub fn socket_rcv_buf_size_bytes(self, socket_rcv_buf_size_bytes: u64) -> Self
pub fn keep_alive_interval_ms(self, keep_alive_interval_ms: u64) -> Self
pub fn keep_alive_limit(self, keep_alive_limit: u64) -> Self
pub fn application_description<AppDescription: Into<Vec<u8>>>( self, application_description: AppDescription, ) -> Self
pub fn client_name<ClientName: Into<Vec<u8>>>( self, client_name: ClientName, ) -> Self
pub fn compression_level(self, compression_level: u8) -> Self
pub fn generate_rcv_timestamps(self, generate_rcv_timestamps: bool) -> Self
pub fn generate_send_timestamp(self, generate_send_timestamp: bool) -> Self
pub fn generate_sender_id(self, generate_sender_id: bool) -> Self
pub fn generate_sender_sequence_number( self, generate_sender_sequence_number: bool, ) -> Self
pub fn connect_retries_per_host(self, connect_retries_per_host: i64) -> Self
pub fn connect_retries(self, connect_retries: i64) -> Self
pub fn reconnect_retries(self, reconnect_retries: i64) -> Self
pub fn reconnect_retry_wait_ms(self, reconnect_retry_wait_ms: u64) -> Self
pub fn reapply_subscriptions(self, reapply_subscriptions: bool) -> Self
pub fn provision_timeout_ms(self, provision_timeout_ms: u64) -> Self
pub fn calculate_message_expiration( self, calculate_message_expiration: bool, ) -> Self
pub fn no_local(self, no_local: bool) -> Self
pub fn modifyprop_timeout_ms(self, modifyprop_timeout_ms: u64) -> Self
pub fn ssl_trust_store_dir<ClientName: Into<Vec<u8>>>( self, ssl_trust_store_dir: ClientName, ) -> Self
Auto Trait Implementations§
impl<Host, Vpn, Username, Password, OnMessage, OnEvent> Freeze for SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent>
impl<Host, Vpn, Username, Password, OnMessage, OnEvent> RefUnwindSafe for SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent>where
OnMessage: RefUnwindSafe,
OnEvent: RefUnwindSafe,
Host: RefUnwindSafe,
Vpn: RefUnwindSafe,
Username: RefUnwindSafe,
Password: RefUnwindSafe,
impl<Host, Vpn, Username, Password, OnMessage, OnEvent> Send for SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent>
impl<Host, Vpn, Username, Password, OnMessage, OnEvent> Sync for SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent>
impl<Host, Vpn, Username, Password, OnMessage, OnEvent> Unpin for SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent>
impl<Host, Vpn, Username, Password, OnMessage, OnEvent> UnwindSafe for SessionBuilder<Host, Vpn, Username, Password, OnMessage, OnEvent>where
OnMessage: UnwindSafe,
OnEvent: UnwindSafe,
Host: UnwindSafe,
Vpn: UnwindSafe,
Username: UnwindSafe,
Password: UnwindSafe,
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