pub async fn expect_exact<T: Invocation>(&self, expected_moniker: &str) -> Result<T, Error> {
        let invocation = self.expect_type::<T>().await?;
        if expected_moniker == invocation.target_moniker() {
            Ok(invocation)
        } else {
            Err(err_msg("Incorrect moniker"))
        }
    }
/// Expects the next invocation to be of a particular type and moniker.
/// Returns the casted type if successful and an error otherwise.
Expects the next invocation to be of a particular type and moniker.
Returns the casted type if successful and an error otherwise.
Expects the next invocation to be of a particular type and moniker . Returns the casted type if successful and an error otherwise .
pub async fn expect_exact<T: Invocation>(&self, expected_moniker: &str) -> Result<T, Error> {
        let invocation = self.expect_type::<T>().await?;
        if expected_moniker == invocation.target_moniker() {
            Ok(invocation)
        } else {
            Err(err_msg("Incorrect moniker"))
        }
    }
pub async fn expect_exact < T : Invocation > ( & self , expected_moniker : & str ) -> Result < T , Error > { let invocation = self . expect_type :: < T > ( ) . await ? ; if expected_moniker == invocation . target_moniker ( ) { Ok ( invocation ) } else { Err ( err_msg ( " " ) ) } }
Expects the next invocation to be of a particular type and moniker.
Expects the next invocation to be of a particular type and moniker .
&self
expected_moniker
&str