[−][src]Struct mpdpopm::messages::MessageProcessor
Collective state needed for processing messages, both built-in & generalized
Implementations
impl<I1, I2, '_> MessageProcessor<'_, I1, I2> where
I1: Iterator<Item = String> + Clone,
I2: Iterator<Item = String> + Clone,
[src]
I1: Iterator<Item = String> + Clone,
I2: Iterator<Item = String> + Clone,
pub fn new<'a, IGC>(
music_dir: &'a str,
rating_sticker: &'a str,
ratings_cmd: &'a str,
ratings_cmd_args: I1,
playcount_sticker: &'a str,
playcount_cmd: &'a str,
playcount_cmd_args: I2,
lastplayed_sticker: &'a str,
gen_cmds: IGC
) -> MessageProcessor<'a, I1, I2> where
IGC: Iterator<Item = (String, GeneralizedCommand)>,
[src]
music_dir: &'a str,
rating_sticker: &'a str,
ratings_cmd: &'a str,
ratings_cmd_args: I1,
playcount_sticker: &'a str,
playcount_cmd: &'a str,
playcount_cmd_args: I2,
lastplayed_sticker: &'a str,
gen_cmds: IGC
) -> MessageProcessor<'a, I1, I2> where
IGC: Iterator<Item = (String, GeneralizedCommand)>,
Whip up a new instance; other than cloning the iterators, should just hold references in the enclosing scope
pub async fn check_messages<E, '_, '_, '_, '_, '_>(
&'_ self,
client: &'_ mut Client,
idle_client: &'_ mut IdleClient,
state: PlayerStatus,
command_chan: &'_ str,
cmds: &'_ mut E
) -> Result<()> where
E: Extend<PinnedTaggedCmdFuture>,
[src]
&'_ self,
client: &'_ mut Client,
idle_client: &'_ mut IdleClient,
state: PlayerStatus,
command_chan: &'_ str,
cmds: &'_ mut E
) -> Result<()> where
E: Extend<PinnedTaggedCmdFuture>,
Read messages off the commands channel & dispatch 'em
pub async fn process<'_, '_, '_>(
&'_ self,
msg: String,
client: &'_ mut Client,
state: &'_ PlayerStatus
) -> Result<Option<PinnedTaggedCmdFuture>>
[src]
&'_ self,
msg: String,
client: &'_ mut Client,
state: &'_ PlayerStatus
) -> Result<Option<PinnedTaggedCmdFuture>>
Process a single command
Auto Trait Implementations
impl<'a, I1, I2> RefUnwindSafe for MessageProcessor<'a, I1, I2> where
I1: RefUnwindSafe,
I2: RefUnwindSafe,
[src]
I1: RefUnwindSafe,
I2: RefUnwindSafe,
impl<'a, I1, I2> Send for MessageProcessor<'a, I1, I2> where
I1: Send,
I2: Send,
[src]
I1: Send,
I2: Send,
impl<'a, I1, I2> Sync for MessageProcessor<'a, I1, I2> where
I1: Sync,
I2: Sync,
[src]
I1: Sync,
I2: Sync,
impl<'a, I1, I2> Unpin for MessageProcessor<'a, I1, I2> where
I1: Unpin,
I2: Unpin,
[src]
I1: Unpin,
I2: Unpin,
impl<'a, I1, I2> UnwindSafe for MessageProcessor<'a, I1, I2> where
I1: UnwindSafe,
I2: UnwindSafe,
[src]
I1: UnwindSafe,
I2: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,