pub struct AlfredModule {
pub module_name: String,
pub version: String,
pub config: Config,
pub connection: Connection,
pub capabilities: HashMap<String, String>,
}
Fields§
§module_name: String
§version: String
§config: Config
§connection: Connection
§capabilities: HashMap<String, String>
Implementations§
Source§impl AlfredModule
impl AlfredModule
pub fn manage_args(app_name: &'static str, version: &'static str)
pub const fn get_lib_version() -> &'static str
pub async fn new( module_name: &'static str, version: &'static str, ) -> Result<Self, Error>
pub async fn new_with_details( module_details: ModuleDetails, ) -> Result<Self, Error>
pub fn get_info_message(&self) -> Message
pub async fn listen(&mut self, topic: &str) -> Result<(), Error>
pub async fn receive(&self) -> Result<(String, Message), Error>
pub async fn send(&self, topic: &str, message: &Message) -> Result<(), Error>
pub async fn send_event( &mut self, publisher_name: &str, event_name: &str, message: &Message, ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for AlfredModule
impl !RefUnwindSafe for AlfredModule
impl Send for AlfredModule
impl Sync for AlfredModule
impl Unpin for AlfredModule
impl !UnwindSafe for AlfredModule
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> 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