pub struct Connection { /* private fields */ }Implementations§
Source§impl Connection
impl Connection
pub async fn new(config: &Config) -> Result<Self, Error>
pub async fn listen(&mut self, topic: &str) -> Result<(), Error>
pub async fn receive_all(&self) -> Result<(String, Message), Error>
pub async fn manage_module_info_request( &self, topic: &str, module_name: &str, capabilities: &HashMap<String, String>, ) -> Result<bool, Error>
pub async fn receive( &self, module_name: &str, capabilities: &HashMap<String, String>, ) -> Result<(String, Message), Error>
pub async fn send(&self, topic: &str, message: &Message) -> Result<(), Error>
pub async fn send_event( &self, publisher_name: &str, event_name: &str, message: &Message, ) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
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 moreAuto Trait Implementations§
impl Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more