Struct ruma_appservice_api::Registration
source · pub struct Registration {
pub id: String,
pub url: Option<String>,
pub as_token: String,
pub hs_token: String,
pub sender_localpart: String,
pub namespaces: Namespaces,
pub rate_limited: Option<bool>,
pub protocols: Option<Vec<String>>,
}
Expand description
Information required in the registration yaml file that a homeserver needs.
To create an instance of this type, first create a RegistrationInit
and convert it via
Registration::from
/ .into()
.
Used for appservice registration.
Fields§
§id: String
A unique, user - defined ID of the application service which will never change.
url: Option<String>
The URL for the application service.
Optionally set to null
if no traffic is required.
as_token: String
A unique token for application services to use to authenticate requests to Homeservers.
hs_token: String
A unique token for Homeservers to use to authenticate requests to application services.
sender_localpart: String
The localpart of the user associated with the application service.
namespaces: Namespaces
A list of users, aliases and rooms namespaces that the application service controls.
rate_limited: Option<bool>
Whether requests from masqueraded users are rate-limited.
The sender is excluded.
protocols: Option<Vec<String>>
The external protocols which the application service provides (e.g. IRC).
Trait Implementations§
source§impl Clone for Registration
impl Clone for Registration
source§fn clone(&self) -> Registration
fn clone(&self) -> Registration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Registration
impl Debug for Registration
source§impl<'de> Deserialize<'de> for Registration
impl<'de> Deserialize<'de> for Registration
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<RegistrationInit> for Registration
impl From<RegistrationInit> for Registration
source§fn from(init: RegistrationInit) -> Self
fn from(init: RegistrationInit) -> Self
Auto Trait Implementations§
impl Freeze for Registration
impl RefUnwindSafe for Registration
impl Send for Registration
impl Sync for Registration
impl Unpin for Registration
impl UnwindSafe for Registration
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)