mod auth; mod request; mod xmatrix; use std::ops::Deref; use ruma::{CanonicalJsonValue, OwnedDeviceId, OwnedServerName, OwnedUserId}; use crate::service::appservice::RegistrationInfo; /// Extractor for Ruma request structs pub(crate) struct Ruma { /// Request struct body pub(crate) body: T, pub(crate) sender_user: Option, pub(crate) sender_device: Option, /// X-Matrix origin/server pub(crate) origin: Option, pub(crate) json_body: Option, // This is None when body is not a valid string pub(crate) appservice_info: Option, } impl Deref for Ruma { type Target = T; fn deref(&self) -> &Self::Target { &self.body } }