pub struct Subscribe { /* private fields */ }Implementations§
Source§impl Subscribe
impl Subscribe
Sourcepub fn new() -> Self
pub fn new() -> Self
Deleted default constructor equivalent in Rust
This prevents instantiation without arguments, as Rust does not support = delete.
Sourcepub fn connect(
&mut self,
url: &str,
connection_options: ConnectionOptions,
) -> Result<(), String>
pub fn connect( &mut self, url: &str, connection_options: ConnectionOptions, ) -> Result<(), String>
Establishes a connection to a specified server URL using the given configuration options.
§Arguments:
url- The server’s address (e.g., “tcp://127.0.0.1:5555”).connection_options- The connection settings, including TLS certificate and timeouts.
§Returns:
Ok(())if the connection is successful.Err(String)with the error message if the operation fails.
Sourcepub fn disconnect(&mut self) -> Result<(), String>
pub fn disconnect(&mut self) -> Result<(), String>
Disconnects the current connection and frees the associated resources.
§Returns:
Ok(())if the disconnection is successful.Err(String)with the error message if the operation fails.
pub fn unsubscribe(&mut self, request: &Request, id: u32) -> Result<(), String>
pub fn subscribe<I>(
&mut self,
request: &Request,
paths: I,
group_name: &str,
frequency_divider: u32,
) -> Result<ReadOnlySubscription, String>where
I: Parameters,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Subscribe
impl !RefUnwindSafe for Subscribe
impl !Send for Subscribe
impl !Sync for Subscribe
impl Unpin for Subscribe
impl !UnwindSafe for Subscribe
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