@@ -123,24 +123,12 @@ impl ClientBuilder {
123123
124124 /// Set the homeserver URL to use.
125125 ///
126- /// The following methods are mutually exclusive:
127- /// [`homeserver_url()`][Self::homeserver_url]
128- /// [`server_name()`][Self::server_name]
129- /// [`insecure_server_name_no_tls()`][Self::insecure_server_name_no_tls]
130- /// [`server_name_or_homeserver_url()`][Self::server_name_or_homeserver_url],
126+ /// The following methods are mutually exclusive: [`Self::homeserver_url`],
127+ /// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
128+ /// [`Self::server_name_or_homeserver_url`].
131129 /// If you set more than one, then whatever was set last will be used.
132130 pub fn homeserver_url ( mut self , url : impl AsRef < str > ) -> Self {
133- self . homeserver_cfg = Some ( HomeserverConfig :: Url ( url. as_ref ( ) . to_owned ( ) ) ) ;
134- self
135- }
136-
137- /// Set sliding sync to a specific version.
138- #[ cfg( feature = "experimental-sliding-sync" ) ]
139- pub fn sliding_sync_version_builder (
140- mut self ,
141- version_builder : SlidingSyncVersionBuilder ,
142- ) -> Self {
143- self . sliding_sync_version_builder = version_builder;
131+ self . homeserver_cfg = Some ( HomeserverConfig :: HomeserverUrl ( url. as_ref ( ) . to_owned ( ) ) ) ;
144132 self
145133 }
146134
@@ -149,11 +137,9 @@ impl ClientBuilder {
149137 /// We assume we can connect in HTTPS to that server. If that's not the
150138 /// case, prefer using [`Self::insecure_server_name_no_tls`].
151139 ///
152- /// The following methods are mutually exclusive:
153- /// [`homeserver_url()`][Self::homeserver_url]
154- /// [`server_name()`][Self::server_name]
155- /// [`insecure_server_name_no_tls()`][Self::insecure_server_name_no_tls]
156- /// [`server_name_or_homeserver_url()`][Self::server_name_or_homeserver_url],
140+ /// The following methods are mutually exclusive: [`Self::homeserver_url`],
141+ /// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
142+ /// [`Self::server_name_or_homeserver_url`].
157143 /// If you set more than one, then whatever was set last will be used.
158144 pub fn server_name ( mut self , server_name : & ServerName ) -> Self {
159145 self . homeserver_cfg = Some ( HomeserverConfig :: ServerName {
@@ -168,11 +154,9 @@ impl ClientBuilder {
168154 /// (not secured) scheme. This also relaxes OIDC discovery checks to allow
169155 /// HTTP schemes.
170156 ///
171- /// The following methods are mutually exclusive:
172- /// [`homeserver_url()`][Self::homeserver_url]
173- /// [`server_name()`][Self::server_name]
174- /// [`insecure_server_name_no_tls()`][Self::insecure_server_name_no_tls]
175- /// [`server_name_or_homeserver_url()`][Self::server_name_or_homeserver_url],
157+ /// The following methods are mutually exclusive: [`Self::homeserver_url`],
158+ /// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
159+ /// [`Self::server_name_or_homeserver_url`].
176160 /// If you set more than one, then whatever was set last will be used.
177161 pub fn insecure_server_name_no_tls ( mut self , server_name : & ServerName ) -> Self {
178162 self . homeserver_cfg = Some ( HomeserverConfig :: ServerName {
@@ -185,18 +169,27 @@ impl ClientBuilder {
185169 /// Set the server name to discover the homeserver from, falling back to
186170 /// using it as a homeserver URL if discovery fails. When falling back to a
187171 /// homeserver URL, a check is made to ensure that the server exists (unlike
188- /// [`homeserver_url()`][ Self::homeserver_url]) , so you can guarantee that
189- /// the client is ready to use.
172+ /// [`Self::homeserver_url`] , so you can guarantee that the client is ready
173+ /// to use.
190174 ///
191- /// The following methods are mutually exclusive:
192- /// [`homeserver_url()`][Self::homeserver_url]
193- /// [`server_name()`][Self::server_name]
194- /// [`insecure_server_name_no_tls()`][Self::insecure_server_name_no_tls]
195- /// [`server_name_or_homeserver_url()`][Self::server_name_or_homeserver_url],
175+ /// The following methods are mutually exclusive: [`Self::homeserver_url`],
176+ /// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
177+ /// [`Self::server_name_or_homeserver_url`].
196178 /// If you set more than one, then whatever was set last will be used.
197179 pub fn server_name_or_homeserver_url ( mut self , server_name_or_url : impl AsRef < str > ) -> Self {
198- self . homeserver_cfg =
199- Some ( HomeserverConfig :: ServerNameOrUrl ( server_name_or_url. as_ref ( ) . to_owned ( ) ) ) ;
180+ self . homeserver_cfg = Some ( HomeserverConfig :: ServerNameOrHomeserverUrl (
181+ server_name_or_url. as_ref ( ) . to_owned ( ) ,
182+ ) ) ;
183+ self
184+ }
185+
186+ /// Set sliding sync to a specific version.
187+ #[ cfg( feature = "experimental-sliding-sync" ) ]
188+ pub fn sliding_sync_version_builder (
189+ mut self ,
190+ version_builder : SlidingSyncVersionBuilder ,
191+ ) -> Self {
192+ self . sliding_sync_version_builder = version_builder;
200193 self
201194 }
202195
0 commit comments