pub struct HomeserverConfig {
pub host_port: u64,
pub server_name: String,
pub public_baseurl: String,
pub registration_shared_secret: String,
pub extra_fields: HashMap<String, Value>,
}
Expand description
Configuration for the homeserver.
This will be applied to homeserver.yaml.
Fields§
§host_port: u64
The port exposed on the host
server_name: String
The name of the homeserver.
public_baseurl: String
The URL to communicate to the server with.
The registration shared secret, if provided.
extra_fields: HashMap<String, Value>
Any extra fields in the homeserver config
Implementations§
Source§impl HomeserverConfig
impl HomeserverConfig
Sourcepub fn builder() -> HomeserverConfigBuilder<((), (), (), (), ())>
pub fn builder() -> HomeserverConfigBuilder<((), (), (), (), ())>
Create a builder for building HomeserverConfig
.
On the builder, call .host_port(...)
(optional), .server_name(...)
(optional), .public_baseurl(...)
(optional), .registration_shared_secret(...)
(optional), .extra_fields(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of HomeserverConfig
.
Source§impl HomeserverConfig
impl HomeserverConfig
Sourcepub fn set_host_port(&mut self, port: u64)
pub fn set_host_port(&mut self, port: u64)
Set the port, resetting the public base url.
pub fn host_port_default() -> u64
pub fn server_name_default() -> String
pub fn public_baseurl_default() -> String
Trait Implementations§
Source§impl Debug for HomeserverConfig
impl Debug for HomeserverConfig
Source§impl Default for HomeserverConfig
impl Default for HomeserverConfig
Source§fn default() -> HomeserverConfig
fn default() -> HomeserverConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HomeserverConfig
impl<'de> Deserialize<'de> for HomeserverConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HomeserverConfig
impl RefUnwindSafe for HomeserverConfig
impl Send for HomeserverConfig
impl Sync for HomeserverConfig
impl Unpin for HomeserverConfig
impl UnwindSafe for HomeserverConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more