pub async fn room_invitation_payload(
        &self,
        room_invitation_id: String,
    ) -> Result<RoomInvitationPayload, PuppetError> {
        debug!("room_invitation_payload(room_invitation_id = {})", room_invitation_id);
        let cache = &*self.cache_room_invitation_payload;
        if cache.lock().unwrap().contains(&room_invitation_id) {
            Ok(cache.lock().unwrap().get(&room_invitation_id).unwrap().clone())
        } else {
            match self
                .puppet_impl
                .room_invitation_raw_payload(room_invitation_id.clone())
                .await
            {
                Ok(payload) => {
                    cache.lock().unwrap().put(room_invitation_id.clone(), payload.clone());
                    Ok(payload)
                }
                Err(e) => Err(e),
            }
        }
    }
/// Load a room invitation by id.
Load a room invitation by id.
Load a room invitation by id .
pub async fn room_invitation_payload(
        &self,
        room_invitation_id: String,
    ) -> Result<RoomInvitationPayload, PuppetError> {
        debug!("room_invitation_payload(room_invitation_id = {})", room_invitation_id);
        let cache = &*self.cache_room_invitation_payload;
        if cache.lock().unwrap().contains(&room_invitation_id) {
            Ok(cache.lock().unwrap().get(&room_invitation_id).unwrap().clone())
        } else {
            match self
                .puppet_impl
                .room_invitation_raw_payload(room_invitation_id.clone())
                .await
            {
                Ok(payload) => {
                    cache.lock().unwrap().put(room_invitation_id.clone(), payload.clone());
                    Ok(payload)
                }
                Err(e) => Err(e),
            }
        }
    }
pub async fn room_invitation_payload ( & self , room_invitation_id : String , ) -> Result < RoomInvitationPayload , PuppetError > { debug ! ( " " room_invitation_id ) ; let cache = & * self . cache_room_invitation_payload ; if cache . lock ( ) . unwrap ( ) . contains ( & room_invitation_id ) { Ok ( cache . lock ( ) . unwrap ( ) . get ( & room_invitation_id ) . unwrap ( ) . clone ( ) ) } else { match self . puppet_impl . room_invitation_raw_payload ( room_invitation_id . clone ( ) ) . await { Ok ( payload ) => { cache . lock ( ) . unwrap ( ) . put ( room_invitation_id . clone ( ) , payload . clone ( ) ) ; Ok ( payload ) } Err ( e ) => Err ( e ) , } } }
Load a room invitation by id.
Load a room invitation by id .
&self
room_invitation_id
String
&self
room_invitation_id
String