Update docs (#453)

This commit is contained in:
Flori 2023-12-10 18:51:32 +01:00 committed by GitHub
commit e6c627afbc
4 changed files with 263 additions and 160 deletions

417
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -62,7 +62,7 @@ async fn main() {
"wss://example.com/".to_string(),
"https://example.com/cdn".to_string(),
);
let instance = Instance::new(bundle, true)
let instance = Instance::new(bundle)
.await
.expect("Failed to connect to the Spacebar server");
// You can create as many instances of `Instance` as you want, but each `Instance` should likely be unique.

View File

@ -72,7 +72,7 @@ impl PartialEq for LimitsInformation {
}
impl Instance {
/// Creates a new [`Instance`] from the [relevant instance urls](UrlBundle), where `limited` is whether Chorus will track and enforce rate limits for this instance.
/// Creates a new [`Instance`] from the [relevant instance urls](UrlBundle). To create an Instance from one singular url, use [`Instance::from_root_url()`].
pub async fn new(urls: UrlBundle) -> ChorusResult<Instance> {
let is_limited: Option<LimitsConfiguration> = Instance::is_limited(&urls.api).await?;
let limit_information;

View File

@ -19,7 +19,7 @@ async fn main() {
"wss://example.com/".to_string(),
"https://example.com/cdn".to_string(),
);
let instance = Instance::new(bundle, true)
let instance = Instance::new(bundle)
.await
.expect("Failed to connect to the Spacebar server");
// You can create as many instances of `Instance` as you want, but each `Instance` should likely be unique.