pub fn into_mac_received(
        self,
        event: &ToDeviceEvent<MacEventContent>,
    ) -> Result<SasState<MacReceived>, SasState<Canceled>> {
        self.check_event(&event.sender, &event.content.transaction_id)
            .map_err(|c| self.clone().cancel(c))?;

        let (devices, master_keys) = receive_mac_event(
            &self.inner.lock().unwrap(),
            &self.ids,
            &self.verification_flow_id,
            event,
        )
        .map_err(|c| self.clone().cancel(c))?;

        Ok(SasState {
            inner: self.inner,
            verification_flow_id: self.verification_flow_id,
            creation_time: self.creation_time,
            last_event_time: self.last_event_time,
            ids: self.ids,
            state: Arc::new(MacReceived {
                we_started: self.state.we_started,
                their_pubkey: self.state.their_pubkey.clone(),
                verified_devices: Arc::new(devices),
                verified_master_keys: Arc::new(master_keys),
            }),
        })
    }
/// Receive a m.key.verification.mac event, changing the state into
/// a `MacReceived` one
///
/// # Arguments
///
/// * `event` - The m.key.verification.mac event that was sent to us by
/// the other side.
Receive a m.key.verification.mac event, changing the state into
a `MacReceived` one
Receive a m . key . verification . mac event changing the state into a ` MacReceived ` one
pub fn into_mac_received(
        self,
        event: &ToDeviceEvent<MacEventContent>,
    ) -> Result<SasState<MacReceived>, SasState<Canceled>> {
        self.check_event(&event.sender, &event.content.transaction_id)
            .map_err(|c| self.clone().cancel(c))?;
        let (devices, master_keys) = receive_mac_event(
            &self.inner.lock().unwrap(),
            &self.ids,
            &self.verification_flow_id,
            event,
        )
        .map_err(|c| self.clone().cancel(c))?;
        Ok(SasState {
            inner: self.inner,
            verification_flow_id: self.verification_flow_id,
            creation_time: self.creation_time,
            last_event_time: self.last_event_time,
            ids: self.ids,
            state: Arc::new(MacReceived {
                we_started: self.state.we_started,
                their_pubkey: self.state.their_pubkey.clone(),
                verified_devices: Arc::new(devices),
                verified_master_keys: Arc::new(master_keys),
            }),
        })
    }
pub fn into_mac_received ( self , event : & ToDeviceEvent < MacEventContent > , ) -> Result < SasState < MacReceived > , SasState < Canceled > > { self . check_event ( & event . sender , & event . content . transaction_id ) . map_err ( | c | self . clone ( ) . cancel ( c ) ) ? ; let ( devices , master_keys ) = receive_mac_event ( & self . inner . lock ( ) . unwrap ( ) , & self . ids , & self . verification_flow_id , event , ) . map_err ( | c | self . clone ( ) . cancel ( c ) ) ? ; Ok ( SasState { inner : self . inner , verification_flow_id : self . verification_flow_id , creation_time : self . creation_time , last_event_time : self . last_event_time , ids : self . ids , state : Arc :: new ( MacReceived { we_started : self . state . we_started , their_pubkey : self . state . their_pubkey . clone ( ) , verified_devices : Arc :: new ( devices ) , verified_master_keys : Arc :: new ( master_keys ) , } ) , } ) }
Receive a m.key.verification.mac event, changing the state into
a `MacReceived` one
Receive a m . key . verification . mac event changing the state into a ` MacReceived ` one
self
event
&ToDeviceEvent<MacEventContent>
self
event
&ToDeviceEvent<MacEventContent>