Struct Subscribe

Source
pub struct Subscribe<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Subscribe<'a>

Source

pub fn new(request: &'a Request) -> Self

Deleted default constructor equivalent in Rust This prevents instantiation without arguments, as Rust does not support = delete.

Source

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.
Source

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.
Source

pub fn subscribe<I>( &mut self, paths: I, group_name: &str, frequency_divider: u32, ) -> Result<ReadOnlySubscription, String>
where I: Parameters,

Trait Implementations§

Source§

impl<'a> Connection for Subscribe<'a>

Implement the common trait for Subscribe

Source§

fn connect( &mut self, url: &str, options: ConnectionOptions, ) -> Result<(), String>

Connect to a server
Source§

fn disconnect(&mut self) -> Result<(), String>

Disconnect from the server

Auto Trait Implementations§

§

impl<'a> Freeze for Subscribe<'a>

§

impl<'a> !RefUnwindSafe for Subscribe<'a>

§

impl<'a> !Send for Subscribe<'a>

§

impl<'a> !Sync for Subscribe<'a>

§

impl<'a> Unpin for Subscribe<'a>

§

impl<'a> !UnwindSafe for Subscribe<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.